|
-
May 16th, 2005, 08:12 AM
#6
Frenzied Member
Re: Detect country of origin
I could be wrong but I don't think you can execute that code from a website - due to permissions. Client-side code has strict limitations when running in a browser - you certainly can't get all those details about a website visitors machine for privacy reasons.
Server-side you could use Request.ServerVariables("REMOTE_ADDR") to return the visitors IP address and then use a third party service to find the location of the visitor. Please note this is not completely accurate though - I show up as London, UK but this is where my ISP is based - I'm in Birmingham.
It depends if this information needs to be 100% accurate - if you only want it for localisation purposes this is quite good enough.
HTH
DJ
If I have been helpful please rate my post. If I haven't tell me!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|