HighTechTalks DotNet Forums  

Determining Country of Origin

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Determining Country of Origin in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Fred Nelson
 
Posts: n/a

Default Determining Country of Origin - 07-14-2003 , 12:32 PM






Hi:

I'm writing an "international" web application. The application will be
accessed from around the world and I would like to write a "country
customization" routine. If someone from the USA accesses it I want to show
a US flag, if an "Aussie" accesses it the Australian flag should display -
etc.

I understand you can be fairly accurate in deterring where the person is
located based on their IP addresses. I also understand that there are some
numbers that you can't be completely sure of.

Does anyone know where I could find the list that I'm looking for?

Thanks very much!

Fred



Reply With Quote
  #2  
Old   
Jonathan Amend
 
Posts: n/a

Default Re: Determining Country of Origin - 07-16-2003 , 03:37 AM






The best way of doing this that I know of would be to use
Request.UserLanguages(0). It returns the first country code in the client's
browser settings, for which you can get a quick reference by going to tools
Quote:
internet options > languages > add in Internet Explorer.
"Fred Nelson" <fred (AT) smartybird (DOT) com> wrote

Quote:
Hi:

I'm writing an "international" web application. The application will be
accessed from around the world and I would like to write a "country
customization" routine. If someone from the USA accesses it I want to
show
a US flag, if an "Aussie" accesses it the Australian flag should display -
etc.

I understand you can be fairly accurate in deterring where the person is
located based on their IP addresses. I also understand that there are
some
numbers that you can't be completely sure of.

Does anyone know where I could find the list that I'm looking for?

Thanks very much!

Fred





Reply With Quote
  #3  
Old   
Fred Nelson
 
Posts: n/a

Default Re: Determining Country of Origin - 07-16-2003 , 10:26 AM



Jonathan:

This looks VERY GOOD - I'll give this a shot!

Thanks very much!

Fred

"Jonathan Amend" <cephas_is (AT) hotmail (DOT) com> wrote

Quote:
The best way of doing this that I know of would be to use
Request.UserLanguages(0). It returns the first country code in the
client's
browser settings, for which you can get a quick reference by going to
tools
internet options > languages > add in Internet Explorer.

"Fred Nelson" <fred (AT) smartybird (DOT) com> wrote in message
news:OaOsyViSDHA.2148 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Hi:

I'm writing an "international" web application. The application will be
accessed from around the world and I would like to write a "country
customization" routine. If someone from the USA accesses it I want to
show
a US flag, if an "Aussie" accesses it the Australian flag should
display -
etc.

I understand you can be fairly accurate in deterring where the person is
located based on their IP addresses. I also understand that there are
some
numbers that you can't be completely sure of.

Does anyone know where I could find the list that I'm looking for?

Thanks very much!

Fred







Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: Determining Country of Origin - 07-17-2003 , 05:35 AM



I'm not really into microsoft programming, but you could have a look
at my code and see whether you can translate it into .NET or whatever.
The java version is named javainetlocator (available from sf.net). The
perl version is IP::Country on search.cpan.org

The perl version is bundled with instructions on how to put together
the database, and locations for the raw data.

Nigel Wetters
Research Fellow
London School of Hygiene and Tropical Medicine

Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: Determining Country of Origin - 07-17-2003 , 05:38 AM



"Fred Nelson" <fred (AT) smartybird (DOT) com> wrote

Quote:
The best way of doing this that I know of would be to use
Request.UserLanguages(0). It returns the first country code in the
client's
browser settings, for which you can get a quick reference by going to
tools
internet options > languages > add in Internet Explorer.

This isn't a very accurate method. A combination of
HTTP_ACCEPT_LANGUAGE and IP->country geolocation turns out to be much
better. See Paul Hastings (ColdFusion) work here:

http://tessaban.tei.or.th/unicode/JavaLocator.cfm


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.