其实并不是这样的。只是默认用falsh 把断流的一段段重新组起来而已!
<pre>
const USER_AGENT = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36";
const REFERER = "
http://www.youku.com";
const FORM_ENCODE = "GBK";
const TO_ENCODE = "UTF-8";
private static $base = "
http://v.youku.com/player/getPlaylist/VideoIDS/";
private static $source = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/\\:._-1234567890";
private static $sz = '-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1';
private static $str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
public static function parse($url){
preg_match("#id\_([\w=]+)#", $url, $matches); //id里可以有=号
if (empty($matches)){
$html = self::_cget($url);
preg_match("#videoId2\s*=\s*\'(\w+)\'#", $html, $matches);
if(!$matches) return false;
}
//根据you vid 获取相应的视频地址
return self::_getYouku(trim($matches[1]));
}
</pre>