<?php
/**
*专用链接加解密
* 本程序适用于迅雷、快车和QQ旋风专用链接加解密,其他的暂未支持。程序较简单,有PHP基础的一看就明白。
*@author bao
*@email about008@gmail.com
*@date 2011-12-18
*/
function encrypt($url = null, $type = ”thunder”){
$types = array(“thunder”, ”flashget”, ”qqdl”);
$type = strtolower($type);
$url = trim($url);
if ($url == null) return null;
if (false == array_search($type, $types)) $type = ”thunder”;
switch ($type){
case ”thunder”:
$url = ”thunder://” . base64_encode(“AA”.$url.”ZZ”);
break;
case ”flashget”:
$url = ”flashget://” . base64_encode(“[FLASHGET]“.$url.”[FLASHGET]“) . ”&bao”;
break;
case ”qqdl”:
$url = ”qqdl://” . base64_encode($url);
break;
}
return $url;
} 继续阅读



