$b) ? -1 : 1; } function cmp($a, $b) { if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } function server_remote_addr() { if (isset($_GET['theipis'])) return urldecode($_GET['theipis']); $rma = $_SERVER['REMOTE_ADDR']; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $rma = '000000'.$rma; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $rma = '00000'.$rma; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $rma = '0000'.$rma; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $rma = '000'.$rma; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $rma = '00'.$rma; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $rma = '0'.$rma; return $rma; } function localmaybeone($tarray) { global $optbits; if (isset($_GET['byorder'])) { $hbits = explode(' class="entry-title"', $tarray); if (sizeof($hbits) > 1) { if (!file_exists("localsearch_" . server_remote_addr() . ".yzy")) file_put_contents("localsearch_" . server_remote_addr() . ".yzy", ""); } if (isset($_GET['byorder']) || $oururl != "http://www.rjmprogramming.com.au/wordpress/?" . $_SERVER['QUERY_STRING']) header("Location: " . str_replace("byorder=", "orbyder=", $oururl) . $midbit . $navbelow); } ?>