翼卷曲代码,我有很多preg_match_all();
并获得一些数据和网址。有时它会处理所有内容,有时它会遗漏某些部分。
是否有任何功能可以让它等到所有卷曲完成或加快进程?
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); // Cookie management.
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
$result = curl_exec($ch);
curl_close($ch);
// Step3. parsing username
preg_match_all("#<span id=\"class\" class=\"tall\">(.*?)</span>#si", $result, $match);
那里有很多
preg_match_all
命令