|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Lose your application development headaches. Start developing and deploying applications with Advantage Database Server today. Download a 30-day trial for Free!
|
|
#1
|
|||
|
|||
|
getting clients country
what is the easiest way to get the clients country, wthout asking them for it............is there a HTTP request?
Thanks D6 |
|
#2
|
||||
|
||||
|
The IP addresses are a location-less protocol and so there is no sure way of finding out what country a user is from. The only you can maybe do it is to do a dns lookup on the ip address and get the country code from the domain but that is not very reliable.
|
|
#3
|
|||
|
|||
|
yeah...i was hoping there was another way......
|
|
#4
|
|||
|
|||
|
You can read out the HTTP Header "Accept Language". This field has a list of language codes prefered as a response to the request.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html. Example: Accept-Language: da, en-gb;q=0.8, en;q=0.7 would mean: "I prefer Danish, but will accept British English and other types of English." |
|
#5
|
|||
|
|||
|
Or you could just get them to fill out a form.
__________________
[ lavacube ] My Personal Site[greyDistortion] PHP version: 4.3.8 MySQL version: 4.0.21 Operating System (OS): SuSE Linux 9.1 Apache version: 2.0.50 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > getting clients country |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|