if (isset($_GET['ya'])) $ya=$_GET['ya']; ?> if (isset($_POST['ya'])) $ya=$_POST['ya']; ?>
$urls=array(); if (isset($_POST['urls'])) $urls=explode("\n", $_POST['urls']); //print_r($urls); $serp = file_get_contents($ya); echo $http_response_header[0]; echo '
'.urldecode($ya).'
'; //echo str_replace('<', '<', $serp); $pattern = '/
]*href=\"(http:\/\/[^\"]*)\"/is'; preg_match_all($pattern, $serp, $out); //print_r($out[1]); foreach ($out[1] as $i) $urls[]=$i; //print_r($urls); $pattern = '/
следующая<\/a>/is'; preg_match_all($pattern, $serp, $out); //echo $out[1][0]; $ya='http://www.yandex.ru'.$out[1][0]; //sleep(rand(2, 7)); if ($ya=='http://www.yandex.ru') $ya=''; ?>
=implode("\n", $urls)?>
[×]
if ($ya!='') { ?> } ?>