用PHP嗅探视频的真实地址!

aries 发表于 2013-02-26 2565 次浏览 标签 : php嗅探朋友网

这个是借力打力,只是抓去朋友网的内容!!!

不过相当好用哦!

看代码:

<?php
$videourl='http://v.youku.com/v_show/id_XMjA5MjQ0OTQ0.html';
function get_content($url ,$data){
	if(is_array($data)){
		$data = http_build_query($data, '', '&');	
	}
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_URL,$url);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
	$result = curl_exec($ch);
	return $result;
}
$str = get_content('http://share.pengyou.com/json.php?mod=usershare&act=geturlinfo',array('url'=>$videourl));
$str=json_decode($str);
var_dump($str);
?>

2条评论

  1. 这个抓出来的是swf啊 不是真实的flv地址啊

    1. 你可以用这个方法获取真实的地址
      http://iw3c.com/archive/950/

      aries
    镜花水月 回复
如需评论,请填写表单。
换一个

记住我的信息