for ($p = 0; $p < 10; $p++) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://yandex.ru/yandsearch?p=".$p."&text=test"); curl_setopt($ch, CURLOPT_TIMEOUT, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTIONTIMEOUT, 1); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)'); $ss=explode("\n",curl_exec($ch)); $res=join("",$ss); curl_close($ch); } .....
CURLOPT_URL, "http://yandex.ru/yandsearch?p=".$p."&text=test");