迅雷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、Discuz!X同步好友到漫游应用
https://www.onexin.net/discuz-x-sync-friends-to-roaming-applications/

2、[个人潜能8B]克服失败和成功的恐惧和克服被拒绝的恐惧
https://www.onexin.net/personal-potentials-8a-to-overcome-the-fear-of-failure-and-success-and-overcome-the-fear-of-being-rejected/

3、医学英语构词法(二)
https://www.onexin.net/medical-english-word-formation-b/

4、CSS如何让图片垂直并水平居中等比缩放?
https://www.onexin.net/div-css-how-to-make-image-vertical-and-align-center-geometric-scaling/

5、译稿:网站设计之合理架构css
https://www.onexin.net/translation-website-design-and-reasonable-framework-for-css/

Leave a Reply