PHP thunder, express, Tornado download dedicated link conversion code
Source: Internet
Author: User
Copy CodeSave it as CS. php. To save it as another name, modify the line <form action = cs. php method = get>. Copy codeThe Code is as follows: <? PHP
Function zhuanhuan (){
$ Urlodd = explode ('/', $ _ Get ["url"], 2); // divide the link into two sections. // The first section is the first section, followed by the second paragraph
$ Head = strtolower ($ urlodd [0]); // PHP is case sensitive, which is first converted to lowercase. Otherwise, http: or thunder: is not easy to handle.
$ Behind = $ urlodd [1];
If ($ head = "Thunder :"){
$ Url = substr (base64_decode ($ behind), 2,-2); // base64 decryption, remove the preceding AA and the following ZZ
}
Elseif ($ head = "flashget :"){
$ Url1 = explode ('&', $ behind, 2 );
$ Url = substr (base64_decode ($ url1 [0]), 10,-10); // base64 decryption, remove the previous [flashget]
}
Elseif ($ head = "qqdl :"){
$ Url = base64_decode ($ behind); // base64 decryption
}
Elseif ($ head = "http:" | $ head = "ftp:" | $ head = "MMS:" | $ head = "rtsp: "| $ head =" https :"){
$ Url = $ _ Get ["url"]; // The regular address only supports the HTTP, https, FTP, MMS, and RTSP transmission protocols. It seems that few other addresses are supported, A network disk like XX is actually based on base64, but some cannot be downloaded even after decryption.
}
Else {echo "this page does not support this protocol currently ";}
Return $ URL;
}
If ($ _ Get ["url"]! = NULL ){
$ Url = zhuanhuan ($ _ Get ["url"]);
$ Url_thunder = "Thunder: //". base64_encode ("AA". $ URL. "ZZ"); // base64 encryption, the same is true for the following 2
$ Url_flashget = "flashget: //". base64_encode ("[flashget]". $ URL. "[flashget]"). "& aiyh ";
$ Url_qqdl = "qqdl: //". base64_encode ($ URL );}
?>
<Form action = cs. php method = get> enter the normal link or the URL of Xunlei, express, and Tornado: <input type = text name = "url" size = "80">
<Input type = submit value = "Conversion">
</Form>
<P> actual address: <a href = "<? PHP echo $ URL;?> "Target =" _ blank "> <? PHP echo $ URL;?> </A>
<P> thunder chain: <a href = "<? PHP echo $ url_thunder;?> "Target =" _ blank "> <? PHP echo $ url_thunder;?> </A>
<P> express chain: <a href = "<? PHP echo $ url_flashget;?> "Target =" _ blank "> <? PHP echo $ url_flashget;?> </A>
<P> tornado chain: <a href = "<? PHP echo $ url_qqdl;?> "Target =" _ blank "> <? PHP echo $ url_qqdl;?> </A>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service