Welcome to WebmasterWorld Guest from 54.162.157.249

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Getting the users country from the ip address

how & are there any seo issues?

     
11:58 am on Apr 2, 2002 (gmt 0)

10+ Year Member



The site I am working with at the minute get a large amount of international traffic. See below

45% UK
35% US
10% Canadian
4% Australian
4% South African
2% Other.

I have seen websites automatically redirect me to a local version of their site by using my IP address (e.g. Lycos). Does anyone know how this is done? Ideally, I am looking for either a tutorial or sample code. I presume it has something to do with the RIPE NNC database. Also, if I do manage to get this working, are there any search engine optimisation issues? Will the spiders penalise me for doing this? Is it counted as cloaking?

Your help is greatly appreciated.

Chris.

2:41 pm on Apr 2, 2002 (gmt 0)

10+ Year Member



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?
4:05 pm on Apr 2, 2002 (gmt 0)

10+ Year Member



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?

<added>
if so, of course there is no standart but a database, probably the rir's
do have such dbs
</added>

(edited by: PsychoTekk at 4:15 pm (utc) on April 2, 2002)

4:14 pm on Apr 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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...

10:16 pm on Apr 5, 2002 (gmt 0)

10+ Year Member



Try this

[geo-ip.com...]

10:24 pm on Apr 5, 2002 (gmt 0)

10+ Year Member



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.
10:29 pm on Apr 5, 2002 (gmt 0)

10+ Year Member



make it "latitude and logitude" ;)
2:54 pm on May 20, 2002 (gmt 0)

10+ Year Member



I have located these urls for updated ip/countries databases.

[ftp.apnic.net...] (Asia)
ftp://ftp.arin.net/pub/stats/arin/ (America)
ftp://ftp.ripe.net/ripe/stats/ (Europe)

I have not anyone for Africa.

I think you would need some scripting for obtain valid data from this sources.

3:02 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member


There's some interesting information here on Internet Geography:

http://www.zooknic.com/

3:02 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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...

Nick

3:17 pm on May 20, 2002 (gmt 0)

10+ Year Member


I have found this free script that maybe useful, I have just found it. I must test it.

http://www.mimtech.com/download/SmartRedirector.zip

4:10 pm on May 20, 2002 (gmt 0)

10+ Year Member



You could also try gnation in Sourceforge.
Has worked for me.
9:56 pm on Aug 20, 2002 (gmt 0)

10+ Year Member


You may want to check these out. Highly accurate!

http://www.networldmap.com/TryIt.htm
http://www.geobutton.com/geophrase.htm

10:18 pm on Aug 20, 2002 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Would proxies mess the numbers up a little?

My ISP uses a proxy.

8:26 am on Aug 21, 2002 (gmt 0)

10+ Year Member



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...

gsx

9:48 am on Aug 23, 2002 (gmt 0)

10+ Year Member



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.

1:06 am on Oct 2, 2002 (gmt 0)

10+ Year Member



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]

1:32 am on Oct 2, 2002 (gmt 0)

10+ Year Member



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. ;)
1:38 am on Oct 2, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] tgotchi
 

Featured Threads

Hot Threads This Week

Hot Threads This Month