Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!isset($host) or empty($host)) { $host = $_SERVER['REMOTE_ADDR']; }
- $row = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=".$host));
- echo('<div class="alert alert-info">'.
- '<b>IP Address: </b>'.$row['geoplugin_request'].'<br />'.
- '<b>City: </b>'.$row['geoplugin_city'].'<br />'.
- '<b>State/Providence: </b>'.$row['geoplugin_regionName'].'<br />'.
- '<b>Area Code: </b>'.$row['geoplugin_areaCode'].'<br />'.
- '<b>Country: </b>'.$row['geoplugin_countryName'].'<br />'.
- '<b>Latitude: </b>'.$row['geoplugin_latitude'].'<br />'.
- '<b>Longitude: </b>'.$row['geoplugin_longitude'].'<br />'.
- '<b>Currency Code: </b>'.$row['geoplugin_currencyCode'].'</div>'
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement