PHP generates download link code instances for software such as thunder, express train, and Tornado _ php instances

Source: Internet
Author: User
Tags php software
This article mainly introduces download link instances for PHP software such as thunder, express, and Tornado. If you need them, refer The Code is as follows:


Function Download (){
$ Urlodd = explode ('/', $ _ POST ["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 = $ _ POST ["url"]; // regular addresses only support 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 ($ _ POST ["url"]! = NULL ){
$ Url = Download ($ _ POST ["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 );
}
?>

Actual address: "target =" _ blank ">

Thunder chain: "target =" _ blank ">

Express Link: "target =" _ blank ">

Tornado chain: "target =" _ blank ">

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.