Thread: Help w/ GEOIP
View Single Post
Old 10-28-2006, 10:10 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
heres a totally free method that doesnt cause a huge server load either..

keep in mind because its free its not the BEST geo database out there but hey its free..



save as something.php
----------------------------------------------

Code:
<html>
<head>
</head>
<body>


Hi, Im Brooke my hometown is 






<?php
// ip to html bt stb
$addr = getenv("REMOTE_ADDR");
$tb = "http://api.hostip.info/get_html.php?ip=$addr&position=true";
$ntml = file_get_contents($tb);
$trip = explode('Latitude:',$ntml);
$ctcn = $trip[0];
$trip = explode('City: ',$ctcn);
$ctcn = trim($trip[1]);
echo $ctcn;
?>


</body>
</html>
-------------------------------------------


Heres an example

http://ytmnd.webspacemania.com/freegeo/
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote