SixTimesEight

msg:3420238 | 5:51 pm on Aug 12, 2007 (gmt 0) |
Are you using PHP? Here is something I've used.
// create an array of watched IP addresses $watchedIPs = array('x.x.x.x','x.x.x.x');
// check the remote address against the array of IP addresses for($i=0, $num=sizeof($watchedIPs); $i<$num; $i++){ if(strpos($_SERVER['REMOTE_ADDR'],$watchedIPs[$i])!== false){ /* send a notification email */ } }
|
directrix

msg:3420288 | 7:05 pm on Aug 12, 2007 (gmt 0) |
Thanks, but except for the search box my site is entirely static. I can use PHP, but I don't know whether I could intercept the request and deal with it on the fly? Or whether I'd need to process the log file once an hour?
|
rocknbil

msg:3420551 | 6:45 am on Aug 13, 2007 (gmt 0) |
Since the request is for a static page, only the web server software is "aware" of the page being requested. Check out the capabilities of the mod actions [httpd.apache.org] module, it would be a very simple thing to write a script to do this. You could even write it in PHP and have the module execute it for you, although perl is probably more adept at command line scripting.
|
|