[Melbourne-pm] finding the ip address of the web client

Andrew Dent sgc294 at internode.on.net
Mon Feb 9 16:08:36 PST 2009

  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
 I'm not sure if this is possible. 
 We have some internal web based reports (Perl with the CGI module)
that run queries on an internal Ingres database server (HPUX &
 The server has databases on it that hold data for all of our offices
throughout Asia. 
 At the moment any employee in any of our offices globally can run
the reports for any other office. 
 I'd like to know if there is a way to restrict this based on the
country location of the IP address of the webclient that is attempting
to run the report. 
 If we can get the IP address, then we can use nslookup to determine
the Full Qualified hostname and figure out which country the webclient
is in (.aus for Australia, .chn for China, .ind for India etc). 
 All the data for the offices is identified with codes inside the
database, so mapping from .aus to the Australia office code is easy. 
 Can/Should this be done in the Perl code on the Server side, or does
this need to be done in some Java Script (or other such technology) on
the client side?
 Either way, does anyone know how to do this?
 99% of the web clients will be Windows with a mixture of browsers
limited to IE6, IE7 and Firefox. 
 Andrew Dent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20090210/b09d0b05/attachment.html>

More information about the Melbourne-pm mailing list