Andy

php一键提取诚通网盘分享直连
诚通网盘直连提取说明1.解析城通网盘和皮皮网盘直链下载2.解决城通网盘和皮皮网盘烦人的各种广告3.有能力的可以自己...
扫描右侧二维码阅读全文
15
2018/07

php一键提取诚通网盘分享直连

诚通网盘直连提取

说明

1.解析城通网盘和皮皮网盘直链下载
2.解决城通网盘和皮皮网盘烦人的各种广告
3.有能力的可以自己适当进行更改
4.转载或使用请保留版权!!

用法用法

url:网盘外链地址
注:如果网盘外链有密码,需在链接结尾加上 ?key=密码

演示

http://api.iiwl.cc/ct/

http://api.iiwl.cc/ct/?url=https://u17877708.ctfile.com/fs/17877708-297837876

带密码的演示:

http://api.iiwl.cc/ct/?url=https://u3791809.ctfile.com/fs/3791809-298607370?key=123456

源代码

注:转载可以但请不要改版权??尊重作者的劳动成果!!
<?php
/**
 * @package ctdisk
 * @author Mlooc
 * @version 1.0.0
 * @link https://mlooc.cn
 */
// 指定允许其他域名访问  
header('Access-Control-Allow-Origin:*');
    function object_array($array) {  
        if(is_object($array)) {  
            $array = (array)$array;  
        } if(is_array($array)) {  
            foreach($array as $key=>$value) {  
                $array[$key] = object_array($value);  
            }  
        }  
        return $array;  
    }

    function MloocCurl($url){
        $UserAgent = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36';#设置UserAgent
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_USERAGENT, $UserAgent);
        #关闭SSL
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        #返回数据不直接显示
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        $response = curl_exec($curl);
        curl_close($curl);
        return $response;
    }
    if (!empty($_GET['url'])) {
        $url = $_GET['url'];
        
        $urlInfo = MloocCurl($url);

        $ruleMatchDetailInList = "~var userid = '(.*?)'~";#正则表达式
        preg_match($ruleMatchDetailInList,$urlInfo,$userid);

        $ruleMatchDetailInList = "~onclick=\"free_down\('(.*?)', 0, '(.*?)', 0, 0\)\" id=\"free_down_link\">~";#正则表达式
        preg_match($ruleMatchDetailInList,$urlInfo,$downInfo);
        $userid=$userid[1];
        $file_chk=$downInfo[2];
        $fid=$downInfo[1];

        $url="https://mlooc.ctfile.com/get_file_url.php?uid=".$userid."&fid=".$fid."&file_chk=".$file_chk;
        $downInfo=MloocCurl($url);
        // $downUrl = $result["main"]["descr_downurl"];
        $downInfo=json_decode($downInfo);
        $downInfo=object_array($downInfo);
        print_r($downInfo["downurl"]);
    }else{
        $result_url = str_replace("index.php","","//".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?url=https://u17877708.ctfile.com/fs/17877708-297837876");
        $resultpwd_url = str_replace("index.php","","//".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?url=https://u3791809.ctfile.com/fs/3791809-298607370");
        echo "演示:";
        echo "<br/>";
        echo "<br/>";
        echo "无密码:";
        echo '<a href="'.$result_url.'" target="_blank">'.$result_url.'</a>';
        echo "<br/>";
        echo "<br/>";
        echo "带密码:";
        echo '<a href="'.$resultpwd_url.'?key=123456" target="_blank">'.$resultpwd_url.'?key=123456</a>';
    }
?>
本文转至于 Mlooc博客的php提取诚通直连
最后修改:2018 年 08 月 01 日 12 : 25 PM
如果觉得我的文章对你有用,请随意赞赏
支付宝首页搜索7169743即可免费打赏

发表评论