Made this since I needed to download Crysis Walkthrough and jDownloader wouldn't parse Playlists xD.
Note: If you find that a link is incomplete please fix the RegEx accordingly and PM me, I'll be more than glad to add updates
Here's the Code:
Do comment if you have any problems/doubts or you wish to express some gratitude
Note: If you find that a link is incomplete please fix the RegEx accordingly and PM me, I'll be more than glad to add updates
Here's the Code:
PHP:
<?php
function getVideos($link){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
preg_match_all("/\/watch\?v=[a-zA-Z0-9\-_]+/", $data, $matches);
$i = 0;
foreach($matches[0] as $videos){
if($i % 2 == 0)
echo "www.youtube.com".$videos."<br />";
$i++;
}
}
getVideos("Playlist Link here..");
?>
Do comment if you have any problems/doubts or you wish to express some gratitude