代碼如下:
<?php
//
echo getYoukuFlv($_GET[
function getYoukuFlv($url){
preg_match("#id_(
$id=$out[
$content=get_curl_contents(
$data=json_decode($content);
foreach($data
$sid=getSid();
$fileid=getfileid($v
$one=($data
if($k ==
continue;
}
}
function get_curl_contents($url
if(!function_exists(
$c = curl_init();
curl_setopt($c
$UserAgent=$_SERVER[
curl_setopt($c
curl_setopt($c
curl_setopt($c
curl_setopt($c
$cnt = curl_exec($c);
$cnt=mb_check_encoding($cnt
curl_close($c);
return $cnt;
}
function getSid() {
$sid = time()
return $sid;
}
function getkey($key
$a = hexdec($key
$b = $a ^
$b = dechex($b);
return $key
}
function getfileid($fileId
$mixed = getMixString($seed);
$ids = explode("*"
unset($ids[count($ids)
$realId = "";
for ($i=
$idx = $ids[$i];
$realId
}
return $realId;
}
function getMixString($seed) {
$mixed = "";
$source = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/:
$len = strlen($source);
for($i=
$seed = ($seed *
$index = ($seed /
$c = substr($source
$mixed
$source = str_replace($c
}
return $mixed;
}
?>
From:http://tw.wingwit.com/Article/program/PHP/201311/20940.html