[NTLUG:Discuss] PHP revisited:need more info please
Rob Apodaca
rob.apodaca at attbi.com
Fri Feb 21 21:16:50 CST 2003
How about:
<?
function die_email ($mesg) {
$email = "yourself at wherever.com";
mail("$email", "Bad guys on web site", "$mesg", "$email");
die ("$mesg");
}
foreach ($HTTP_GET_VARS as $secvalue) {
if (eregi("<[^>]*script*\"?[^>]*>", $secvalue)) {
die_email ("I don't like you...");
}
}
?>
You could also put more useful information in the email like the ip address of the offender which you could add to an htaccess file to deny future access to your site.
Hope it helps
Cheers,
-rob
More information about the Discuss
mailing list