I've found a service to do this but it is £50 a month to use SOAP. Anyone else come across a service or code to do this?
one could perform a nslookup, and for the .net allocated ips
an additional whois lookup getting the country...
but this is 1st very slow and 2nd might end up in your ip being banned from
the whois service because of exhausting use (although my isp's whole ip range
would have been banned then over the past two years hehe)
no really, there must be a more effective way
maybe an ip's first two octets also specify the allocated country?
if so, of course there is no standart but a database, probably the rir's
do have such dbs
(edited by: PsychoTekk at 4:15 pm (utc) on April 2, 2002)
I'm not aware of any pre-rolled service, but it would be fairly simple to knock up a script to compare the visitors IP address to a list of IP ranges / country (a couple of lists were mentioned in this thread [webmasterworld.com] ) and then either serve up an appropriate page (similar to cloaking) or a simple redirect to a completely different page.
The second method could be fairly dangerous SEO-wise - as with all redirects - but the first shouldn't cause too many problems IMO, as you wouldn't be serving up different content to users and spiders within the same region...
The coordinates are witing the DNS answer (called DNS loc), Horizontal and Vertical in degrees, you have to map them to a country though (dll's are avaiable) note not all have dns loc data, if so fire off a trace take the hop prior to the last one, and extract the dns loc there.
make it "latitude and logitude" ;)
I have located these urls for updated ip/countries databases.
I have not anyone for Africa.
I think you would need some scripting for obtain valid data from this sources.
|There's some interesting information here on Internet Geography:|
I asked about this somewhere else (ah the shame...) and was told by a reliable source that it was dead tricky. In fact it's pretty much impossible to do it effectively with just an ip address.
I also hear there are some subcriber services that claim to be use...
|I have found this free script that maybe useful, I have just found it. I must test it.|
You could also try gnation in Sourceforge.
Has worked for me.
|You may want to check these out. Highly accurate!|
|brotherhood of LAN|
Would proxies mess the numbers up a little?
My ISP uses a proxy.
Proxies, large corporate networks, people have ISPS in different countries, and the changing location of an IP address are downsides. Doing it is relatvly easy...
PhyscoTek, why don't you read in the IP address country information and then cache it on your site for future reference?
I do currency conversion with my merchant account. The first time anyone visits any page where currency conversion is required, I load in the conversion figures and cache them in a file on my server. The first time is quite slow, but I use the same figures for 24 hours, thus I only call their server once per day (maximum).
Yours would be different, calling the server quite often, but if you cache each result (date each and everyone) for 4,6 or maybe even 8 weeks, the load will gradually drop.
Try this www.location.com.my
Better and cheaper than other solutions.
[edited by: jatar_k at 1:37 am (utc) on Oct. 2, 2002]
[edit reason] unlinked url [/edit]
netgeo.com is a nice place to start, or you can possible use the ARIN database. I was planning to make that into my next web service. ;)
Welcome to WebmasterWorld [webmasterworld.com] tgotchi