Php Script, Referrer, User agent,Cookie and More
<p>Here is my script:
Its not working, according to what i developed it for.</p>

<pre><code>&lt;?php

  include("geoip.inc");
$ip=$_SERVER['REMOTE_ADDR'];
$gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);

$country_code = geoip_country_code_by_addr($gi, "$ip");

// Country name is not used so commented
// Get Country Name based on source IP
//$country = geoip_country_name_by_addr($gi, "$ip");
$real=false;
geoip_close($gi);

if ($_SERVER['HTTP_USER_AGENT']!= 'Googlebot') {
    if ($_COOKIE['iwashere'] != "yes")  {
        setcookie("iwashere", "yes", time()+315360000); 
        if ($country_code="US") {
            if(preg_match(" /(http|https):\/\/.*google\..+\/url\?sa=(.+)$/", $_SERVER['HTTP_REFERER'])) {

                include_once("Biggenius.htm");
                exit;
           }
            else {
                $real = true;
            }
        } else {
            $real = true;
        }
    }
 else {
    $real = true;
}
}
else {
                $real = true;
            }
if ($real) {
    include_once('Biggenius1.htm');
    exit;
}

?&gt;
</code></pre>

<p>To Emulate new user, </p>

<p>I am using <a href="http://hidemyass.com" rel="nofollow">http://hidemyass.com</a></p>

<p>But its not working.</p>

<p>Here is url for referrer</p>

<pre><code>http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=10&amp;ved=0CHoQFjAJ&amp;url=http://grand-theft-auto-v.tk/Biggenius.php
</code></pre>

<p>Link for Script <a href="http://grand-theft-auto-v.tk" rel="nofollow">http://grand-theft-auto-v.tk</a></p>

<p>New user should be redirected to "Biggenius1.htm"
You might also consider my Regex , i doubt if it is wrong.</p>

<p>Any help will be much appreciated. </p>

<p>Thanks</p>
