最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

php 模拟登陆微云,微云

互联网 admin 54浏览 0评论

php 模拟登陆微云,微云

作者:matrix

发布时间:2013年10月26日

分类:兼容并蓄 零零星星

微云网盘的10TB空间也要全部利用起来。

申明:此页面的源码已失效,走这里查看最新>>微云网盘php解析源码_更新

代码来自破博客

//提取微云分享地址

preg_match('|\/.+\/(\w+)|', $_SERVER['REQUEST_URI'], $res);

$key = $res ? $res[1] : exit("weiyun URL error!");

$url = $referer = "/$key";

$useragent = "BlackBerry/3.6.0";

//匹配出下载地址

$curl = curl_init($url);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_USERAGENT, $useragent);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

$src = curl_exec($curl);

curl_close($curl);

preg_match('|http://.+sharekey[^"]+|', $src, $res);

$url = $res ? $res[0] : exit("weiyun URL error! Not find weiyun code!");

//伪造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, $useragent);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

$src = curl_exec($curl);

curl_close($curl);

//从响应信息头匹配出真实的文件地址并下载

preg_match('|Location: (.+)\r|', $src, $res);

$songurl = $res ? $res[1] : exit("Can not get WeiYun Download url!");

header("Location: $songurl");

//echo $songurl;

?>

这种方法该不错滴。

使用示例:/微云URL

阅读剩余部分 »

php 模拟登陆微云,微云

作者:matrix

发布时间:2013年10月26日

分类:兼容并蓄 零零星星

微云网盘的10TB空间也要全部利用起来。

申明:此页面的源码已失效,走这里查看最新>>微云网盘php解析源码_更新

代码来自破博客

//提取微云分享地址

preg_match('|\/.+\/(\w+)|', $_SERVER['REQUEST_URI'], $res);

$key = $res ? $res[1] : exit("weiyun URL error!");

$url = $referer = "/$key";

$useragent = "BlackBerry/3.6.0";

//匹配出下载地址

$curl = curl_init($url);

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_USERAGENT, $useragent);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

$src = curl_exec($curl);

curl_close($curl);

preg_match('|http://.+sharekey[^"]+|', $src, $res);

$url = $res ? $res[0] : exit("weiyun URL error! Not find weiyun code!");

//伪造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, $useragent);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

$src = curl_exec($curl);

curl_close($curl);

//从响应信息头匹配出真实的文件地址并下载

preg_match('|Location: (.+)\r|', $src, $res);

$songurl = $res ? $res[1] : exit("Can not get WeiYun Download url!");

header("Location: $songurl");

//echo $songurl;

?>

这种方法该不错滴。

使用示例:/微云URL

阅读剩余部分 »

发布评论

评论列表 (0)

  1. 暂无评论