Update youtube.php
This commit is contained in:
parent
e71eee1b6d
commit
e9267965dc
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
# I recommend you use HTTPS and Basic access authentication to protect this file.
|
||||
$locale = 'en_US.utf-8';
|
||||
setlocale(LC_ALL, $locale);
|
||||
putenv('LC_ALL='.$locale);
|
||||
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
switch ($method) {
|
||||
case 'POST':
|
||||
|
@ -9,7 +13,7 @@
|
|||
echo json_encode($urls, JSON_UNESCAPED_SLASHES);
|
||||
#shell_exec("echo '".json_encode($urls)."' >>/tmp/out.txt 2>&1 &");
|
||||
foreach ($urls as $url) {
|
||||
shell_exec("cd /home/downloads;./youtube '".$url."' >>/tmp/youtube.txt 2>&1 &");
|
||||
shell_exec("cd /home/downloads;./youtube ".escapeshellarg($url)." >>/tmp/youtube.txt 2>&1 &");
|
||||
}
|
||||
exit;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue