<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>G'day<br>
<br>
I'm not sure if this is possible. <br>
<br>
We have some internal web based reports (Perl with the CGI module) that run queries on an internal Ingres database server (HPUX &amp; Apache). <br>
The server has databases on it that hold data for all of our offices throughout Asia. <br>
At the moment any employee in any of our offices globally can run the reports for any other office. <br>
<br>
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. <br>
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). <br>
All the data for the offices is identified with codes inside the database, so mapping from .aus to the Australia office code is easy. <br>
<br>
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?<br>
Either way, does anyone know how to do this?<br>
99% of the web clients will be Windows with a mixture of browsers limited to IE6, IE7 and Firefox. <br>
<br>
Cheers<br>
<br>
Andrew Dent<br>
<br>
 <BR></HTML>