Здравствуйте. Помогите разобраться в чем ошибка? Код (Text): $url = str_ireplace(array("http://www.","http://"), '',"http://www.stihi.in.ua/proizved.php"); //$ch = curl_init('http://yandex.ru/yandsearch?text=url%3A'.urlencode($url).'+%7C+url%3Awww.'.urlencode($url).'&lr=213'); $ch = curl_init('http://yandex.ru/yandsearch?text=url%3Astihi.in.ua/proizved.php+%7C+url%3Awww.stihi.in.ua/proizved.php&lr=213'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20120815 Firefox/16.0 bot'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HEADER, false); $ret = curl_exec($ch); curl_close($ch); //<strong class="b-head-logo__text">Нашёлся<br>1 ответ</strong> echo htmlspecialchars($ret); echo preg_match('|<strong class="b-head-logo__text">(.*?)</strong>|is',$ret,$index); preg_match('|<br>(\d*?)\ |Uis',$index[1],$index); $index = $index[1]>0?1:2; //echo $index; if($index==1)echo'Проиндексировано'; else echo'Не проиндексировано'; echo'<br />'; Скрипт должен проверять страницу на индексированность, но не делает этого, помогите решить проблему!