[thelist] Country by IP address

Tony Crockford tonyc at boldfish.co.uk
Tue Jun 15 07:31:02 CDT 2004


At 12:44 on Tuesday, 15 Jun 2004, Andy Budd wrote:

>
> Any suggestions would be welcome

Couldn't you use getenv [1] and  gethostbyaddr [2] to get the hostname and  
then parse_url[3] to get .com or .co.uk?

I'm sure Dunstan Orchard [3] did something similar to this recently for  
something he was working on.

hth

[1]http://uk.php.net/getenv
[2]http://uk.php.net/manual/en/function.gethostbyaddr.php
[3]http://uk.php.net/parse_url
[4]http://www.1976design.com/blog/archive/2004/01/16/who-where-how/


More information about the thelist mailing list