opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi monks i would like to display full host name, just like this website http://www.berm.co.nz/onlinenow/ . When u click on numbers, it displays something like this cache4.att.sch.gr, so that i can figure out the country the user is from and i don't want ip numbers.
"I really don't live on earth, it's just my reflection"
"open source is not only technology, but it's a world out there - opensourcer"

Replies are listed 'Best First'.
Re: displaying visitors full hostname
by jbrugger (Parson) on Mar 09, 2005 at 10:57 UTC
    Assuming people aren't using anonymous proxies, i thought a tool like webalizer (perl) or awstats (c) does this for you.
    In debian i'd use the module libnet-xwhois-perl - Whois Client Interface for Perl5 to check this kind of information, form cpan use whois
Re: displaying visitors full hostname
by ww (Archbishop) on Mar 09, 2005 at 16:26 UTC
    In any case, relying on country-codes (as it appears you intend) is NOT trustworthy. Note comment above about anonymisers; be aware that not all "users" will actually be from the country provided by that user's browser (even if you can get it to cough up an honest hostname, which (possibly redundant) is !eq referrer).