<?php
require_once('Net/GeoIP.php');
$ip = $_SERVER['REMOTE_ADDR'];
$geoip = Net_GeoIP::getInstance('lib/GeoIP.dat');
$countryName = $geoip->lookupCountryName($ip);
$countryCode = $geoip->lookupCountryCode($ip);
?>
<?php
require_once('HTTP/Request.php');
$ip = $_SERVER['REMOTE_ADDR'];
$url = "http://api.hostip.info/get_html.php?ip={$ip}";
$req = new HTTP_Request($url);
$req->sendRequest();
$request = $req->getResponseBody();
?>