ed.brz9.dev/proj/YT2P/handler.php

42 lines
811 B
PHP

<!DOCTYPE HTML>
<html>
<head>
<title>YT2P - Results</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div id="root">
<section id="output">
<h4>Here are your prompts!</h4>
<p>You can copy them one by one in ChatGPT. Why is it presented that way? Check out our <a href="./qna.php" target="_blank">Q&A page</a>.</p>
<?php
$url = $_POST['url'];
$lang = $_POST['lang'];
$cmd = "python3 y2t.py " . $url . " " . $lang ;
exec($cmd, $output, $return);
foreach ($output as $item) {
echo "<copbox>";
echo $item;
echo "</copbox>";
}
?>
</section>
</div>
<script src="assets/js/vue.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>