Just for the history:
-----------------------
In addition to the simple <domain>.ISO_country_code classification there
are also other ways to get the country origin. But I agree with Martin
(nazdar Martine :) ) there are not so used and tend to be unreliable.
*) Each host belongs to a domain. Each domain has a primary DNS server. You
can query that DNS server for it's geographical location (I don't remember
now the query type). Anyway not all DNS servers has this info available
*) Each host access the internet through an ISP or an Organization. These
providers have assigned several C-Class networks or even B-Class
network(s). Theoretically you could build (:>) a database of IP networks
and it's owner -> for example if a host with IP xxx.xxx.xxx.yyy access your
system you could query your database against the xxx.xxx.xxx network. Once
again ... this just a theoretical approach..
In generall ... IP assignments tend to be a great chaos today so in other
words follow this "rule"
<domain-name>.ISO_country_code -> You know the coutry
<domain-name>.edu | mil -> mostly USA
<domain-name>.org -> chaos
<domain-name>.ISO_country_code.com -> not so used, but when used you know
the country
<domain-name>.com -> another chaos
It's a mess :))
Regards
Slavikos
################################################################
Filippos Slavik
Part of the SIAMS's implementation development team. For more
information, please check http://www.siams.net
e-mail : [EMAIL PROTECTED]
################################################################
"The software said 'runs on Win95 or better,' so I installed
it on Linux..."
----- Original Message -----
From: Martin Kuba <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 1999 11:51 AM
Subject: Re: how to get the country of origin?
> Bruno Chevalier wrote:
> >
> > With some statistics software like Web Trends, one can get the country
> > of origin of the visitors.
> > How can I get this information? From the IP adress ? From
> > getRemoteHost()?
>
> You cannot get it. You can use top level domain from getRemoteHost(),
> but it is not reliable. Computers from national domains (.cz,.de,.jp,...)
> are probably located in the corresponding country, but computers
> from the domain ".com" can be just anywhere.
>
> Martin
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> INET, a.s. Mgr. Martin Kuba
> Kralovopolska 139 e-mail: [EMAIL PROTECTED]
> 601 12 Brno WWW: http://www.inet.cz/~makub/
> Czech Republic tel: +420-5-41242414/33
> --------------------------------------------------------------------
> PGP fingerprint = D8 57 47 E5 36 D2 C1 A1 C3 48 B2 59 00 58 42 27
> http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
> --------------------------------------------------------------------
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html