42 lines
785 B
PHP
42 lines
785 B
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");
|
|
|
|
// Open a pipe to the python script
|
|
$handle = popen("python3 y2t.py $url $lang", "r");
|
|
while (!feof($handle)) {
|
|
$output = fread($handle, 1024);
|
|
echo $output;
|
|
}
|
|
$exitCode = pclose($handle);
|
|
|
|
echo nl2br("\n");
|
|
echo "end of php";
|
|
?>
|
|
|
|
|
|
</div>
|
|
<script src="assets/js/vue.min.js"></script>
|
|
<script src="assets/js/app.js"></script>
|
|
|
|
</body>
|
|
</html>
|