if ($q == ""){
header("HTTP/1.1 301 Moved Permanently");
header("status 301 Moved Permanently");
header("Location: http://www.uncoverthenet.com/images/search.htm");
exit;
};
$keyword = $q;
$qnew = ucwords($q);
$today = date("D, M j");
$q123 = str_replace(" ","+",$keyword);
include ("../config.php");
include ("../include.php");
$qnew = ucwords($_GET[q]);
$query = convert($_GET[q]);
$keyword = $qnew;
$today = date("D, M j");
$q123 = str_replace(" ","+",$keyword);
$ip = getenv("REMOTE_ADDR");
$via = $_SERVER['HTTP_VIA'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$agentnew = urlencode($agent);
$xfwd = $_SERVER['HTTP_X_FORWARDED_FOR'];
$serveurl = urlencode( $_SERVER['SERVER_NAME'] );
?>
$handle = @fopen("http://rd.uncoverthenet.com/?affid=1010&xtype=1&start=1&maxcount=2&xformat=xml&ip=$ip&serveurl=$serveurl&via=$via&agent=$agentnew&xfwd=$xfwd&search=" . urlencode($keyword), "rb");
if ($handle) {
$feed = '';
while (!feof($handle)) {
$feed .= fread($handle, 8192);
}
fclose($handle);
$feed = utf8_decode($feed);
while (eregi("( )([^<]+)",$feed,$out)){
$results[$n_results]["LISTING"] = $out[2];
$out[2] = "";
eregi("()([^<]+)",$feed,$out);
$results[$n_results]["TITLE"] = $out[2];
$results[$n_results]["TITLE"] = str_replace(array("<b>","</b>"),array("",""),$results[$n_results]["TITLE"]);
eregi("()([^<]+)",$feed,$out);
$results[$n_results]["TITLE1"] = $out[2];
$results[$n_results]["TITLE1"] = str_replace(array("<b>","</b>"),array("",""),$results[$n_results]["TITLE1"]);
eregi("()([^<]+)",$feed,$out);
$results[$n_results]["DESCRIPTION"] = $out[2];
$results[$n_results]["DESCRIPTION"] = str_replace(array("<b>","</b>"),array("",""),$results[$n_results]["DESCRIPTION"]);
eregi("()([^<]+)",$feed,$out);
$results[$n_results]["SITEHOST"] = $out[2];
eregi("()([^<]+)",$feed,$out);
$results[$n_results]["LINK"] = urldecode($out[2]);
$results[$n_results]["LINK"] = str_replace(array("206.55.125.137","</b>"),array("rd.uncoverthenet.com",""),$results[$n_results]["LINK"]);
$feed = substr($feed,strpos($feed,$out[0])+strlen($out[0]));
$n_results += 1;
};}
if ($results){
echo "";
foreach ($results as $result){
echo " | ";
}
echo " ";
?>
include("http://www.uncoverthenet.com/images/newimage.php?q=$q123"); ?>
if (!$_GET[q]) echo " Please enter a new search term above..." ;
?>
|
|
if ($query){
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password);
mysql_select_db($mysql_database, $bd);
$array_query = split(" ",$query);
$stop_words = array ("a","www","by","from","of","on","to","an","for","in","the","with","and","not","or","same","com","?","!",")","(","%28","%29");
function non_stop_words($var){
global $stop_words;
return !in_array($var,$stop_words);
};
$array_query = array_filter($array_query, "non_stop_words");
rsort($array_query);
if (count($array_query)){
mysql_query("INSERT INTO {$prefix}searches (day,month,year,search) VALUES (".date("d").",".date("m").",".date("Y").",'".convert($q)."')");
mysql_close();
} };
?>