希望有人能发现错误,我需要做的是首先获取网页以获得令牌,然后卷曲带有令牌的新网址;
这是我的代码
$text = $siteName;
if (preg_match('/;t=([a-zA-Z0-9_-]{43})%3D/',$text,$matches)) {
// Match... vjVQa1PpcFMYuRsz10_H-1z41mWWe8d6ENEnBLE7gug
echo 'TOKEN: '.$matches[1];
$curltube = curl_init ();
curl_setopt ($curltube, CURLOPT_URL, "http://www.veoh.com/watch?v=opQ9GzRe5qs".$matches[1]);
curl_setopt ($curltube, CURLOPT_RETURNTRANSFER, 0 );
curl_setopt ($curltube, CURLOPT_COOKIEFILE, "cookie8.txt");
$curltubeplay = curl_exec ($curltube);
curl_close ($curltube);
echo $curltubeplay;
} else {
// No match
}
和之前的代码获取网页
curl_setopt ($ch, CURLOPT_URL, "http://www.veoh.com/watch?v=opQ9GzRe5qs");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 0 );
curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie8.txt");
所以希望有人可以阐明