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

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

其实迅雷的thunder://地址就是将普通url地址加前缀‘AA’、后缀‘ZZ’,再base64编码后得到的字符串
[php]
<?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);
}

}
?>
[/php]

标签


Warning: error_log(/www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/#log/log-0212.txt): failed to open stream: No such file or directory in /www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/spider.class.php on line 2900