PDA

Click to See Complete Forum and Search --> : Detect Country?


benski
Feb 6th, 2001, 03:16 AM
How do I detect the browser's Country?

Using the HTTP_USER_AGENT server variable?

I want to achieve a similar effect to the www.Altavista.com site, where they popup relevant content based on the users location.

I only *really* need to know if the browser is in North America or not.

Thanks,
benski

Jerry Grant
Feb 6th, 2001, 05:51 AM
Use the following:

Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

This returns en-gb for us here in England, so you should be able to parse '??-us'? :cool:

benski
Feb 6th, 2001, 06:51 AM
Nice one Jerry- Thanks! :D