56 lines
1.0 KiB
PHP
56 lines
1.0 KiB
PHP
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Y2T</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
|
|
<div id="root">
|
|
|
|
<h4>Welcome on the handler page v2</h4>
|
|
|
|
<?php
|
|
echo nl2br("entering php\n");
|
|
$url = $_POST['url'];
|
|
echo $url;
|
|
echo nl2br("\n");
|
|
$lang = $_POST['lang'];
|
|
echo $lang;
|
|
echo nl2br("\n");
|
|
|
|
exec("python3 y2t.py $ulr $lang", $output, $return);
|
|
echo nl2br("executing the thing\n");
|
|
//wait($return_code);
|
|
|
|
echo nl2br("output:\n");
|
|
var_export($output);
|
|
echo nl2br("\nreturn:\n");
|
|
var_export($return);
|
|
|
|
|
|
|
|
echo $output;
|
|
|
|
echo nl2br("\n END OF THE OUTPUT\n");
|
|
echo "check";
|
|
|
|
$url = 'https://www.youtube.com/watch?v=GNbTRJHbC4Q';
|
|
$cmd = 'youtube-dl ' . escapeshellarg($url);
|
|
exec($cmd, $output, $ret);
|
|
echo 'output: ';
|
|
var_export($output);
|
|
echo "\nret: ";
|
|
var_export($ret);
|
|
|
|
?>
|
|
|
|
|
|
</div>
|
|
<script src="assets/js/vue.min.js"></script>
|
|
<script src="assets/js/app.js"></script>
|
|
|
|
</body>
|
|
</html>
|