Home  >  Article  >  Backend Development  >  The code for generating the Thunder Express whirlwind link from the address in Thunder Express PHP [test passed]

The code for generating the Thunder Express whirlwind link from the address in Thunder Express PHP [test passed]

WBOY
WBOYOriginal
2016-07-29 08:44:51984browse

Online demo address: http://tools.jb51.net/tools/cs.php

Copy code The code is as follows:


function zhuanhuan() {
$urlodd=explode( '//',$_GET["url"],2);//Divide the link into 2 paragraphs, //The first paragraph is in front, and the second paragraph is in the back
$head=strtolower($urlodd[0]) ;//PHP is case-sensitive, convert it to lowercase uniformly first, otherwise HtTp: or ThUNDER: will appear. This weird way of writing is difficult to handle
$behind=$urlodd[1];
if($head=="thunder: "){
$url=substr(base64_decode($behind), 2, -2);//base64 decryption, remove the AA in front and ZZ in the back
}elseif($head=="flashget:"){
$url1 =explode('&',$behind,2);
$url=substr(base64_decode($url1[0]), 10, -10);//base64 decryption, remove the [FLASHGET] before and after
}elseif( $head=="qqdl:"){
$url=base64_decode($behind);//base64 decryption
}elseif($head=="http:"||$head=="ftp:"||$head ==="mms:"||$head=="rtsp:"||$head=="https:"){
$url=$_GET["url"];//Regular addresses only support http, https, There seem to be few other transmission protocols such as ftp, mms, and rtsp. For example, XX network disk is actually based on base64, but some cannot be downloaded even after decryption.
}else{
echo "This page does not support this protocol for the time being";
}
return $url;
}
if($_GET["url"]!=NULL){
$url=zhuanhuan($_GET["url"]);
$url_thunder="thunder://".base64_encode( "AA".$url."ZZ");//base64 encryption, the same as 2 below
$url_flashget="Flashget://".base64_encode("[FLASHGET]".$url."[FLASHGET]") ."&aiyh";
$url_qqdl="qqdl://".base64_encode($url);
}
?>


jb51.net Please enter a normal link or Thunder, Express, Tornado Chain address:



< p>Actual address:

Express chain:

Cyclone Chain:

The above introduces the code for generating the Thunder Express whirlwind link from the address in Thunder Express PHP [test passed], including the content of Thunder Express. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn