Hi, I need Geo location script to get exact city name via IP. I have seen so many scripts but problem is they provide me wrong city for dynamic ip. i need exact city via ip. please share me if you know about any script.
IPs are given by the internet service provider and where you local internet provider is it will say that you live in that city.
Yes - redesign what you need, because what you want isn't possible. Even if you could get a list of every single dynamic IP address in the world at this instant, it would be inaccurate by tomorrow.
[TABLE] [TR] [TD="class: votecell"][TABLE] [TR] [TD="class: votecell"] [/TD] [TD="class: answercell"] You should use an IP to location API, like these: http://ipinfodb.com/ip_location_api_json.php http://www.ipaddressapi.com/ ($) Or manage to get data from other sources like: http://www.iplocation.net/ http://ip2loc.jerodsanto.net/ [/TD] [/TR] [/TABLE] [/TD] [TD="class: answercell"][/TD] [/TR] [/TABLE]
IP addresses are registered with the company ( IE service provider ) that owns them. Back in the days when I used to be with AOL it showed me as from the US even though I was located in Germany. So you can't get 100% exact location. The scripts mentioned above is the best you will get.
I've never seen one get my location correctly. My provider's official location for the cable leg I'm on is about 4 towns over, so that's where every site thinks I am.
A lot of newbies commenting in this thread. You can Geo Target via IP. It will probably be 95% accurate or the returned city will be relatively close to the visitor. It requires an IP database that is updated regularly. IP2Location.com has a good database/service.
PHP has a GeoIP extension available though it requires compiling with maxmind.com's binaries and DB's (free) see the following: --------------------------------------------------- http://www.php.net/manual/en/ref.geoip.php (overview) http://www.php.net/manual/en/function.geoip-record-by-name.php http://www.php.net/manual/en/geoip.requirements.php --------------------------------------------------- DB's: http://dev.maxmind.com/geoip/geolite PHP DB: http://www.maxmind.com/download/geoip/api/php/ and setup (see comments): http://www.php.net/manual/en/geoip.setup.php server install instruction: http://www.sunfinedata.com/tutorial/use-maxmind-geoip-database-in-your-php-application/ --------------------------------------------------- Once set up you should be able to run something like this below: <?php $record = geoip_record_by_name($_SERVER['REMOTE_ADDR']); if ($record) { print_r($record); } ?> PHP: The above example will output: Array ( [continent_code] => NA [country_code] => US [country_code3] => USA [country_name] => United States [region] => CA [city] => Marina Del Rey [postal_code] => [latitude] => 33.9776992798 [longitude] => -118.435096741 [dma_code] => 803 [area_code] => 310 ) snippet sample from: [URL="http://www.php.net/manual/en/function.geoip-record-by-name.php"]http://www.php.net/manual/en/function.geoip-record-by-name.php[/URL] Code (markup): Good luck with it. ROOFIS
This is actually really easy to do you just follow the hops Traceroute is the program that shows you the route over the network between two systems, listing all the intermediate routers a connection must pass through to get to its destination. It can help you determine why your connections to a given server might be poor, and can often help you figure out where exactly the problem is. It also shows you how systems are connected to each other, letting you see how your ISP connects to the Internet as well as how the target system is connected.