Beispiel #1
0
                }
            }
        }
    }
    return $ipaddress;
}
//Getting Country
function visitor_country($ip)
{
    $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
    if ($ip_data && $ip_data->geoplugin_countryName != null) {
        $result = $ip_data->geoplugin_countryName;
    }
    return @$result;
}
$guestip = get_realip();
@($country = visitor_country($guestip));
$table2 = $prefix . 'bans-country';
$querybanned = mysqli_query($connect, "SELECT * FROM `{$table2}` WHERE country='{$country}'");
$banned = mysqli_num_rows($querybanned);
$row = mysqli_fetch_array($querybanned);
$redirect = $row['redirect'];
$url = $row['url'];
if ($redirect == "Yes") {
    echo '<br /><center>You will be redirected</center><br />
<meta http-equiv="refresh" content="4;url=' . $url . '">';
}
?>
                <p>Please contact the webmaster of the site, if you think something is wrong.</p>
               </center>
              </div>
Beispiel #2
0
        }
    } else {
        $version = $matches['version'][0];
    }
    if ($version == null || $version == "") {
        $version = "?";
    }
    return array('userAgent' => $u_agent, 'name' => $bname, 'version' => $version, 'platform' => $platform, 'pattern' => $pattern);
}
$ua = getBrowser();
//Getting Country
function visitor_country($ip)
{
    $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip));
    if ($ip_data && $ip_data->geoplugin_countryName != null) {
        $result = $ip_data->geoplugin_countryName;
    }
    return @$result;
}
//Getting Visitor Information
$ip = get_realip();
$page = $_SERVER['PHP_SELF'];
@($browser = $ua['name']);
@($browser_version = $ua['version']);
@($os_full = $ua['platform']);
@($os = strstr($os_full, ' ', true));
@($os_version = substr(strstr($os_full, ' '), 1));
@($referer = $_SERVER["HTTP_REFERER"]);
@($country = visitor_country($ip));
$date = date("d F Y");
$time = date("H:i");