@
aligo 优酷:
preg_match('@^http:\/\/v\.youku\.com\/v_show\/id_([\w\d+_-]*)\.html|^http:\/\/v\.youku\.com\/v_show\/id_([\w\d+_-]*)=\.html@i', $url, $matches);
$videoID = $matches[1];
$videoApi = '
http://v.youku.com/player/getPlayList/VideoIDS/'.$videoID;土豆:
preg_match_all('/(<script.*>)(.*)(<\/script>)/imxsU',$data,$matches);
preg_match_all("/(icode = ')(.*)(' ,oid)/i",$matches[0][1],$results);
if (strlen($results[2][0])<11) {
preg_match_all('/(icode:\")(.*)(\")/i',$matches[0][1],$results);
}
$videoApi = '
http://api.tudou.com/v3/gw?method=item.info.get&appKey=myKey&format=json&itemCodes='.$results[2][0];