Merhabalar,
Ben vk.com'daki videoları kendi playerimde yayınlamak istiyorum videoların bulunduğu direk link sürekli sabit kalıyor mu yoksa kullanıcı bazlı token key üretip url sürekli değişiyor mu cookielere göre ? bu konuda bilgisi olan biri yardım edebilir mi
Vk.Com Videoları Sabit Link mi ?
3
●1.165
- 24-07-2013, 06:27:43idm ile bir önceki gün indirmeye başladığım video için ertesi gün devam etmek istediğimde link yenileme istiyor yani değişiyor, tabi rastlantı da olabilir.
- 24-07-2013, 13:40:20Üyeliği durdurulduNette gezinirken şöyle birşey bulmuştum bilgi amaçlı kontrol edebilirsin. (Sabit değil ne yazık ki.)
<?php define("BLOCK", 8*1024); # Надеюсь всем понятно что такое $url $url = "http://vk.com/video_ext.php?oid=168756276&id=165103492&hash=ddf3c50d0e3dd2f3&hd=3"; $ch = curl_init(); $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.2.13) ' . 'Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_HEADER,false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_VERBOSE,1); $vk = curl_exec($ch); curl_close($ch); preg_match('|host=(.*)&|Uis', $vk, $host); preg_match('|uid=(.*)&|Uis', $vk, $uid); preg_match('|vtag=(.*)&|Uis', $vk, $vtag); preg_match('|vkid=(.*)&|Uis', $vk, $vkid); preg_match('|no_flv=(.*)&|Uis', $vk, $no_flv); preg_match('|thumb=(.*)&|Uis', $vk, $thumb); preg_match('|md_title=(.*)&|Uis', $vk, $title); $title = urldecode($title['1']); if($_GET['type'] == 'image'){ $link = $thumb['1']; $header = get_headers($link, 0); $fp = fopen($link, "rb"); if(isset($header)){ foreach($header as $v) header($v); } while(!feof($fp)){ echo fread($fp, BLOCK); } }else{ if($host){ $oldVideo = false; if($uid['1'] == '0'){ $oldVideo = true; } if($oldVideo){ header('Content-Disposition: attachment; filename="'.$title.'.flv"'); $link = 'http://'.$host['1'].'/assets/videos/'.$vtag['1'].$vkid['1'].'.vk.flv'; $header = get_headers($link, 0); $fp = fopen($link, "rb"); if(isset($header)){ foreach($header as $v) header($v); } while(!feof($fp)){ echo fread($fp, BLOCK); } }else{ if($no_flv['1'] == '1'){ header('Content-Disposition: attachment; filename="'.$title.'.mp4"'); $link = $host['1'].'u'.$uid['1'].'/video/'.$vtag['1'].'.240.mp4'; $header = get_headers($link, 0); $fp = fopen($link, "rb"); if(isset($header)) foreach($header as $v) header($v); while(!feof($fp)){ echo fread($fp, BLOCK); } fclose($fp); }else{ header('Content-Disposition: attachment; filename="'.$title.'.flv"'); $link = $host['1'].'u'.$uid['1'].'/video/'.$vtag['1'].'.flv'; $header = get_headers($link, 0); $fp = fopen($link, "rb"); if(isset($header)) foreach($header as $v) header($v); while(!feof($fp)){ echo fread($fp, BLOCK); } fclose($fp); } } }else{ header("HTTP/1.0 404 Not Found"); } } ?>