Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi i want the script which detects

Status
Not open for further replies.

prasadalone

Programmer
Aug 15, 2002
87
hi
i want the script which detects the the country of person who log in to the site.

waiting for your

prasad

 
Good luck.
I actually created an .Net web service that does this but it wasn't easy (a whole lot of sockets and text parsing work - yummy). You need to get their IP an do a whois lookup in about 5-7 different databases. If you goto arin.net (hosts the database for pretty much all the US ips), it should give you clue of the information obtainable. I am not sure that there is an easier way to get this information. The service I created wasn't exactly for the purpose you want it for though. The hacky way I can think to do it is to figure out what language their OS in but that is a real hacky unreliable solution. foo
 
a quick and dirty way I have used is the:

Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

Command

gives en-gb, en-us etc

Hope this helps

 
You can buy a database from
its only $50
Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top