Wednesday, September 30, 2009

How to determine patrons' IP addresses

The issue of authentication for MetaLib can be solved with JavaScript. The variable,"REMOTE_ADDR", can determine clients' IPs. On-campus access does not request authentication; off-campus access does (via EZProxy).

To use this variable, Java scripts need a Server Side Include (SSI) which gives the IP address. To make the web server check for SSI code in your page, you need to add the appropriate extension (for example, .shtml extension) in the web server, and map it to ASP (classic) engine.

Apache needs the include module either loaded or compiled in. Also, these options need to be specified in httpd.conf:
AddHandler server-parsed .shtml
AddOutputFilter INCLUDES .shtml
Options Includes

Technorati Tags: ,,

No comments: