迅雷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);
}

}
?>

随机文章:

1、[个人潜能10A]如何快速并有效的解决问题
https://www.onexin.net/personal-potentials-10a-how-to-quickly-and-effectively-solve-the-problem/

2、HttpFox监控和分析出入HTTP之间通信量
https://www.onexin.net/httpfox-monitoring-and-analysis-of-traffic-between-the-http-access/

3、用MariaDB替代Oracle的MySQL
https://www.onexin.net/oracles-mysql-with-mariadb-alternative/

4、中国天气数据php版
https://www.onexin.net/chinese-weather-data-in-php-version/

5、高性能、高流量Java Web站点打造的22条建议(转)
https://www.onexin.net/high-performance-high-traffic-sites-to-build-java-web-22-recommendations-rpm/

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

Leave a Reply

Your email address will not be published. Required fields are marked *