RE: [PHP] IP and countries -- Discussion Continues
| From: | WILSON, Nick | Date: | Wed, 08 Nov 2000 03:55:31 +0000 |
| Subject: | RE: [PHP] IP and countries -- Discussion Continues | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24253@lists.php.net to get a copy of this message | ||
If I log using the REMOTE_ADDR and resolving the address to a
name, ie
gethostbyaddr($REMOTE_ADDR)
it gives me the remote name of each user, which usually includes
a country, ie
dm1-39.triode.net.au
myangup0.connect.com.au
tycho-165-227-58-95.tychonet.com
etc etc
Which to me would indicate country, ie Aus, Aus and USA ??
Is there more to this that I am missing ? Sure it may be
possible for someone to log on to a remote server in a remote
country and then issue a request for a web page, but the
majority of people simply dial in and then surf, hence their
ISP is the normal point of contact ?
> -----Original Message-----
> From: Maxim Maletsky [mailto:maxim.maletsky@japaninc.net]
> Sent: Wednesday, 8 November 2000 14:02
> To: 'Duncan Hill'; Jordi Amorós
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] IP and countries -- Discussion Continues
>
>
> Hello,
>
> Me too, I was always asking this question myself;
>
> Let's say I have visitor's IP which I add to the database;
> In the feature I want to find out where did the guy came from.
>
> Just resolving it's DNS will give me the domain name which
> doesn't indicate
> the country/continent at all...
>
> No, how can I "ping" his country?
>
> Is there a good way to find out a country by, maybe,
> searching whois (or
> anything else like whois, nic, apnic, whatever: the question
> is right here)
> for the IP and then knowing the format parse the output with
> RegEx finding
> the country's code. Now logically the country code is the one
> submitted by
> the IP owner as a part of _physical_ address.
>
> In this way the result could be very precise.
>
>
>
>
> Is there any simpler way to do what I just tried to explain?
> What is the best way to do that?
> Who did it already?
> Any services do that?
> Any tutorials on this?
> Any ideas of you gurus?
>
>
> Regards,
> Maxim Maletsky.
>
>
> ==========
> Original Discussion
> ==========
>
>
> -----Original Message-----
> From: Duncan Hill [mailto:dhill@bajan.org]
> Sent: Wednesday, November 08, 2000 2:20 AM
> To: Jordi Amorós
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] IP and countries
>
>
> On 2000-11-07, Jordi Amorós did say,
>
> > Hi,
> >
> > I'd like to know how can I get the countrie's range of IP.
>
> You'd have to start querying arin.net, ripe.net and apnic.net to name
> a few.
>
> --
>
> Sapere aude
> My mind not only wanders, it sometimes leaves completely.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>