Re: [PHP] IP address from which country

2002-01-09 Thread Jon Farmer

No such table, the best you can do is look at their hostname and parse the
last part ie .co.uk or .com... And then u can try and figure where they are
from that

Err... Wrong.

You could host a .co.uk in the US or any other country for that matter! What
you need to do is find the IP do a RIPE lookup at www.ripe.net and that will
tell you who the IP is assigned to and where in the world they are. Of
course if its a ISP in Maryland, USA they could have a dialup user from
Australia connected so it only gives limited information.

Regards

Jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IP address from which country

2002-01-09 Thread Dimitris Kossikidis

I 'm not sure, but i beleive you can get visitor's country from Apache 's
Varialble $HTTP_ACCEPT_LANGUAGE. For further information read Predefined
Variables in the manual.

Hope it works!!!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IP address from which country

2002-01-09 Thread Eugene Lee

On Wed, Jan 09, 2002 at 11:33:46AM +0200, Dimitris Kossikidis wrote:
: 
: I 'm not sure, but i beleive you can get visitor's country from Apache 's
: Varialble $HTTP_ACCEPT_LANGUAGE. For further information read Predefined
: Variables in the manual.

This works assuming the browser itself sends the correct country code.
Browsers in most places will send a Content-language: en regardless of
what country the user's browser is running within.


-- 
Eugene Lee
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IP address from which country

2002-01-08 Thread Andrew Brampton

No such table, the best you can do is look at their hostname and parse the last part 
ie .co.uk or .com... And then u can try and figure where they are from that

Andrew
  - Original Message - 
  From: Zhang, Leon (STHK/Zh) 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, January 09, 2002 1:03 AM
  Subject: [PHP] IP address from which country


  Hi,
   In php ,we can easily get the ip address of a connected computer ,but I always see 
on the web that there are some pages can tell you where you are from,so there must be 
a complete table show the relation of the ip address and country or region ,where can 
I find this .

  Thanks .
  Leon



--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



re: [PHP] IP address from which country

2002-01-08 Thread Zhang, Leon (STHK/Zh)


Thank you Andrew,but in China mainland ,I saw many websites can even tells
the province information which the user come from and I think in USA the
State information can also be gotten from the visitor's ip address.BTW,in
PHP what we can get is just the ip address of the user how can we get the
host name ?Anything missed here?
Regards
Leon


-ԭʼÓʼþ-
·¢¼þÈË: Andrew Brampton [mailto:[EMAIL PROTECTED]]
·¢ËÍʱ¼ä: 09 January, 2002 9:46
ÊÕ¼þÈË: Zhang, Leon (STHK/Zh)
³­ËÍ: [EMAIL PROTECTED]
Ö÷Ìâ: Re: [PHP] IP address from which country


No such table, the best you can do is look at their hostname and parse the
last part ie .co.uk or .com... And then u can try and figure where they are
from that

Andrew
  - Original Message - 
  From: Zhang, Leon (STHK/Zh) 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, January 09, 2002 1:03 AM
  Subject: [PHP] IP address from which country


  Hi,
   In php ,we can easily get the ip address of a connected computer ,but I
always see on the web that there are some pages can tell you where you are
from,so there must be a complete table show the relation of the ip address
and country or region ,where can I find this .

  Thanks .
  Leon




--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] IP address from which country

2002-01-08 Thread Jason Murray

 Thank you Andrew,but in China mainland ,I saw many websites can even tells
 the province information which the user come from and I think in USA the
 State information can also be gotten from the visitor's ip address.BTW,in
 PHP what we can get is just the ip address of the user how can we get the
 host name ?Anything missed here?

A database may exist for IPs in China (I don't know), but outside of China 
it's impossible to tell with much accuracy which country an IP is in. You
could look at Digital Envoy, which was an attempt a couple of years ago
to 'map the internet' and obtain exactly the data you're referring to. The
problem is that as soon as that data is published it's out of date due to
routing changes and network configuration changes.

You can do a reverse lookup on the IP address to get the hostname, but you
can rely on that even less - for example, a hostname ending in aol.com could

be in the USA, Europe, Asia, or Australia these days.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




re: [PHP] IP address from which country

2002-01-08 Thread Zhang, Leon (STHK/Zh)

Thank you Jason ,I will check the Digital Envoy to get more information
,have you got the website address of it?



-ԭʼÓʼþ-
·¢¼þÈË: Jason Murray [mailto:[EMAIL PROTECTED]]
·¢ËÍʱ¼ä: 09 January, 2002 10:06
ÊÕ¼þÈË: 'Zhang, Leon (STHK/Zh)'; [EMAIL PROTECTED]
³­ËÍ: [EMAIL PROTECTED]
Ö÷Ìâ: RE: [PHP] IP address from which country


 Thank you Andrew,but in China mainland ,I saw many websites can even tells
 the province information which the user come from and I think in USA the
 State information can also be gotten from the visitor's ip address.BTW,in
 PHP what we can get is just the ip address of the user how can we get the
 host name ?Anything missed here?

A database may exist for IPs in China (I don't know), but outside of China 
it's impossible to tell with much accuracy which country an IP is in. You
could look at Digital Envoy, which was an attempt a couple of years ago
to 'map the internet' and obtain exactly the data you're referring to. The
problem is that as soon as that data is published it's out of date due to
routing changes and network configuration changes.

You can do a reverse lookup on the IP address to get the hostname, but you
can rely on that even less - for example, a hostname ending in aol.com could

be in the USA, Europe, Asia, or Australia these days.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] IP address from which country

2002-01-08 Thread Jason Murray

 Thank you Jason ,I will check the Digital Envoy to get more 
 information, have you got the website address of it?

www.google.com ... digital envoy ... I'm feeling lucky :)

... or just www.digitalenvoy.net.

Search engines are fun :)

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]