迅雷、旋风、快车、RayFile的下载地址转换算法

我们平时在网上寻找资源时,都看到一些网站里特别标明分开,用迅雷下载;用旋风下载;用快车下载等这些标签,如迅雷,我们常常会见到类似于如下的链接地址: thunder://QUFodHRwOi8vZG93bmxvYWRzLmFwcG1hcnRzLmNvbS9hcHBtYXJ0cy5leGVaWg== ,当你点击该地址后,如果你的系统里安装了迅雷软件,迅雷识别它自己的协议头“thunder://”,就弹出询问是否执行下载,因为它可以正确解析这样的地址。

1、普通地址转换为迅雷地址
在原地址前面加”AA”,后面加”ZZ”(注:不包括引号),地址变为
AAhttp://p2s.newhua.com/down/wrar371sc.exeZZ
此地址base64编码为
QUFodHRwOi8vcDJzLm5ld2h1YS5jb20vZG93bi93cmFyMzcxc2MuZXhlWlo=
迅雷专链即在上地址前加thunder://,即
thunder://QUFodHRwOi8vcDJzLm5ld2h1YS5jb20vZG93bi93cmFyMzcxc2MuZXhlWlo=
// 转换迅雷
$xl_url = "thunder://". base64_encode('AA'.$file.'ZZ');
 
// 解密迅雷
$zs_file = base64_decode( str_replace("thunder://", "", $xl_url));
$zs_file = substr($zs_file, 2, -2);

Comments : 0

有问题可在下面发表评论,当然没事也可以在下面吹吹牛皮、扯扯淡!

发表评论

*


Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/blog/content/templates/Bitter/footer.php:40) in /www/wwwroot/blog/include/lib/view.php on line 23