I am trying to make a website using PHP which can download Dailymotion video using the Dailymotion video link. I searched google and found some script. But the scripts are not working. I last tried the following code.
$video="x62w2zn";//a static dailymotion video id
$link="";
$page=file_get_contents('http://www.dailymotion.com/embed/video/'.$video);
$link = substr($page, strlen('mp4","url":"')+strripos($page, 'mp4","url":"')); // beginning of link
$link = substr($link, 0, strpos($link, '"}')); // end of link
$link = str_replace("\\", '', $link); // delete backslashes
if(!empty($link)){
file_put_contents($path_log_link.$video, $link); // save link in log
$cmd='wget -bqc '.$link.' -O "'.$path_download_file.$video.'.mp4"';
exec($cmd,$o,$r);
}
But this script also not working.Showing a blank page after execute and nothing is downloading. Please help me about this problem to solve.