Can anyone give my the URL of that free youtube download script.. similar to this one.. http://www.scriptonit.com/scripts/youtube/downloader/ I found it last time here.. but i forgot to bookmark it.. that's why i lost it.. It's a website that has a free script similar to the URL above.. please anyone
I just put one together. Its a simple function that you supply the video's url, and the function returns the video's download url. If you run the example as is, the function will automatically redirect you and start downloading the file as get_video.flv. I'm not sure as how to force the file to be downloaded to a different file name. You can easily use this function to take a forms input. <?php //PHP FUNCTION FOR GENERATING THE DOWNLOAD URL FOR YOUTUBE VIDEOS function GetYouTubeVideoURL($InputURL){ //Download The Video's Page, and extract the T variable's content $pagecontent = file_get_contents($InputURL); $StartPos = strPos($pagecontent,"watch_fullscreen?video_id="); $EndPos = strPos($pagecontent,";",$StartPos); $pagecontent = substr($pagecontent, $StartPos, $EndPos); $findstr = preg_match("/t=([^(\&|$)]*)/", $pagecontent,$matches); $T_ID = $matches[1]; //Extract The Video's ID from the Given URL $findstr = preg_match("/v=([^(\&|$)]*)/", $InputURL,$matches); $VideoID = $matches[1]; //Start creating the video's URL $YouTubeVideoURL = "http://youtube.com/get_video?video_id=". $VideoID; $YouTubeVideoURL = $YouTubeVideoURL . "&t=" . $T_ID; return $YouTubeVideoURL; } //EXAMPLE USAGE $VideoURL = GetYouTubeVideoURL("http://youtube.com/watch?v=aFgJwRUojKw"); header("Location: " . $VideoURL); ?> PHP:
Updated script has been posted at the link below, along with a working example. http://forums.digitalpoint.com/showthread.php?t=678381