View file search/index.php

File size: 1.16Kb
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
include"../header.php";
print '<div class="b1">Поиск по WАP</div>';
print '<div class="b2">';
print '
<form action="index.php" method="GET">
<input type="text" name="q" value="">
<input type="submit" name="submit" value="Искать">
</form>
<hr />';
if(empty($q)){echo"Введите запрос!";
}else{
$q=urlencode($q);
$result=file("http://www.google.ru/xhtml/search?q=$q&site=mobile&start=$start");
$respage=implode($result);
$res1=explode("<body>",$respage);
$respage=$res1[1];
$respage=str_replace("<img","<noshow",$respage);
$res=explode("<hr/>",$respage);
$respage=$res[0];
$respage=str_replace("href=\"/xhtml/search","href=\"index.php",$respage);
$respage=str_replace("<div class=\"c1\">","<div class=\"mar\">",$respage);
$respage=str_replace("&nbsp;- <span class=\"c2\">","<br/><font color=\"green\">",$respage);
$respage=str_replace("</a>&nbsp;-","</a><br/>",$respage);
$respage=str_replace("</span>","</font>",$respage);
echo"$respage";
}
print'<br><a href="../index.php">На главную</a><br>';
print'</div><div class="b1">&#169; Coding by Moto<br>&#169; Made Moto</div></html>';
?>