Forum Moderators: phranque
// 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 */
}
}
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.