Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ip = $_SERVER['REMOTE_ADDR'];
- if($ip != "74.91.120.70") exit(); //solo mi sv
- set_time_limit(0);
- $id = $_GET["id"];
- if(!file_exists("mp3/" . $id . ".mp3"))
- {
- $url = "http://www.youtube.com/watch?v=" . $id;
- $command = "youtube-dl --extract-audio --audio-format mp3 --max-filesize 10.0m " . $url . " -o mp3/" . $id . "\".%(ext)s\"";
- exec($command);
- }
- if(file_exists("mp3/" . $id . ".mp3"))
- {
- exec("touch mp3/" . $id . ".mp3"); //actualizar fecha
- echo "OK";
- }
- else echo "NO OK";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment