普通url转thunder
<?php
function ThunderEncode($url) {
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$url.$thunderPosix);
return $thunderUrl;
}
?>
thunder转普通url
<?php
function ThunderDecode($thunderUrl) {
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$url=substr(trim($thunderUrl),10);
$url=base64_decode($url);
$url=substr($url,2,-2);
return $url;
}
?>
网友评论