$keyword="nissan"; $need="500"; $parsing_url = 'http://wordstat.yandex.ru/advq?checkboxes=&key=&pg={pg}®ions=&rpt=ppc&shw=1&text={keyword}&tm='; for ($start=0; $start < 3000; $start += 50) { $action = str_replace('{keyword}', urlencode($keyword), $parsing_url); if ($start == 0) $pg=0; else $pg = $start.'-'.$pg; $action = str_replace('{pg}', $pg, $action); sleep(5+rand(1,5)); //та самая задержка перед парсингом очередной страницы $content = file_get_contents($action); preg_match_all("/