迅雷thunder://地址与普通url地址转换

迅雷thunder://地址与普通url地址转换

其实迅雷的thunder://地址就是将普通url地址加前缀‘AA’、后缀‘ZZ’,再base64编码后得到的字符串

<?php
function Thunder($url, $type=’en’) {
if($type ==’en’){
//普通网址转迅雷网址
return “thunder://”.base64_encode(“AA”.$url.”ZZ”);
}else{
//迅雷网址转普通网址
$return substr(base64_decode(substr(trim($url),10)),2,-2);
}

}
?>

转载请注明出处:https://www.onexin.net/thunder-thunder-address-and-general-url-address-translation/

随机文章:

1、Android手机刷机固件ROM制作与研究
https://www.onexin.net/android-phones-making-and-research-brush-pack/

2、如何做301重定向(扩展篇)
https://www.onexin.net/how-to-do-a-301-redirect/

3、数据库操作语句
https://www.onexin.net/database-operation-statement/

4、DISCUZ!X 2.5上传图片后缩略图无水印
https://www.onexin.net/discuz-x-2-5-upload-picture-thumbnail-no-watermark/

5、如何将网站批量提交搜索引擎?
https://www.onexin.net/how-do-i-submit-a-site-bulk-search-engine/

Leave a Reply