Finding a user's country

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

PoorDoggie

Soon to be RICHdoggie!VIP Member
Impact
18
Hi,

I want to be able to find out what country a user is browsing from, without having to use that stupid, massive downloadable table of countries... I have about 30 countries that I need to redirect around my site. (eg: if you are browsing from UK it needs to redirect to the UK version of my site...)

I don't want to have to go through the trauma of having to get that whole list of countries again, isn't there an easier way?

Thanks
Tom
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Hey Tom,

I think the only way you can really grab someones country is through their IP Address, an IP beginning with XXX.XXX comes from a certain country, you can download the list, just google it. There are scripts out there too, but they do a lot more than 30 countries afaik. You could modify it though.

Rhett.
 
0
Close
0
Close
0
Close
Thats a load of help, thanks. I have decided to download the databse from ip-to-country, becasue it is free, and I don't rely on anyone else. It is a bit of a hastle, but I am sure I will cope...

Tom
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back