腾讯微云外链 -凯发k8官方网
百度,360,金山……之前的网盘大战终于落幕。360无限空间获胜……
话说腾讯的10t也可以了,不多说了。下面是微云外连:
//最后更新时间:2013-12-12
//构造微云分享地址
preg_match('|\/. \/(\w )\.|', $_server['request_uri'], $res);
$key = $res ? $res[1] : exit("url format error!");
$url = $referer = "http://share.weiyun.com/$key";
//获取源码,匹配出下载地址
$src = curl_get_contents($url, "");
preg_match('|shareinfo = (.*);|ui', $src, $res);
$json = $res ? json_decode($res[1]) : exit("can not get shareinfo!");
//拼接歌曲链接
$songurl = implode("", array(
"http://".$json->dl_svr_host,
":".$json->dl_svr_port,
"/ftn_handler",
"/".$json->dl_encrypt_url,
"?fname=".urlencode($json->filename),
));
header("location: $songurl");
//用curl获取网页源码
function curl_get_contents($url, $referer) {
$curl = curl_init($url);
curl_setopt($curl, curlopt_header, 1);
curl_setopt($curl, curlopt_returntransfer, 1);
curl_setopt($curl, curlopt_referer, $referer);
curl_setopt($curl, curlopt_useragent, "mozilla/5.0 (iphone; u; cpu iphone os 3_0 like mac os x; en-us)");
curl_setopt($curl, curlopt_timeout, 10);
$src = curl_exec($curl);
curl_close($curl);
return $src;
}
?>
保存weiyun.php文件,ok.
如果分享地址为:
http://share.weiyun.com/37b92875f407f6d595c6eab92792d41a
则外链地址为:
http://xxx/weiyun.php/37b92875f407f6d595c6eab92792d41a.mp3
总结
以上是凯发k8官方网为你收集整理的的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: ios培训章节——c 函数的重载