当前位置:网站首页 > 源码 > 正文

[php源码] 分享一波迅雷|QQ旋风|快车|地址转换工具

作者:精品资源网 日期:2017-08-20 13:45:54 浏览:2136 分类:源码

[php源码] 分享一波迅雷|QQ旋风|快车|地址转换工具


?php 
//error_reporting(0);
$type=array("http","thunder","qqdl","flashget");
$url="";
$http="";
$thunder="";
$qqdl="";
$flashget="";
function httpTo($http){
        $GLOBALS["http"] = $http;
        $GLOBALS["thunder"] = "thunder://".base64_encode("AA".$http."ZZ");
        $GLOBALS["qqdl"] = "qqdl://".base64_encode($http);
        $GLOBALS["flashget"] = "flashget://".base64_encode("[FLASHGET]".$http."[FLASHGET]");
}
if(isset($_POST["url"]))
 
{
        $url=$_POST["url"];
        for($i=0;$icount($type);$i++)
        {
                        if(strpos($_POST["url"],"$type[$i]")!==false)
                        {
                                switch ($i)
                                {
                                case 0:
                                        $http=trim($_POST["url"]);
                                        break;
                                case 1:
                                        $thunder=substr(trim($_POST["url"]),10,strlen(trim($_POST["url"]))-10);
                                        $http=substr(base64_decode($thunder),2,strlen(base64_decode($thunder))-4);
                                        break;
                                case 2:
                                        $qqdl=substr(trim($_POST["url"]),7,strlen(trim($_POST["url"]))-7);
                                        $http=base64_decode($qqdl);
                                        break;
                                case 3;
                                        $flashget=substr(trim($_POST["url"]),11,strlen(trim($_POST["url"]))-11);
                                        $http=substr(base64_decode($flashget),10,strlen(base64_decode($thunder))-10);
                                        break;
                                }
 
                                httpTo($http);
 
                        }        
        }
}
?
 
!DOCTYPE html
html
head
        meta charset=utf-8
        title迅雷|QQ旋风|快车|地址转换工具/title
        style
                *{margin:0;padding: 0;}
                table{width: 500px;height: 180px;}
                th{height:30px;}
                .left{width: 80px;}
                .center{width: 420px;}
                input{width: 420px;height: 30px;border:0;}
                 
        /style
/head
 
body
div id="wrap"
form action="" method="post"
table border=1
trth colspan="2"h2迅雷|QQ旋风|快车|地址转换工具/h2/th/tr
tr
th 地址/th
th input type=text name=url value="?php echo $url;?" //th
/tr
tr
th 直链/th
th input type=text value="?php echo $http;?"//th
/tr
tr
th 迅雷/th
th input type=text value="?php echo $thunder;?"//th
/tr
tr
th QQ旋风/th
th input type=text value="?php echo $qqdl;?"//th
/tr
tr
th 快车/th
th input type=text value="?php echo $flashget;?"//th
/tr
tr
th colspan="2" input type=submit value="开始转换"//th
/tr
/table
/form
/div
 
/body
/html

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

请填写验证码