Forum Moderators: coopster
Now that a version of this page has been setup, I am getting lots of errors for documents like /_vti_bin/owssvr.dll and /MSOffice/cltreq.asp. I know these requests are harmless, and I shouldn't do anything about them.
However, I do want to stop receiving an email notification when these errors occur.
I want to add an if command that will check to see if $_SERVER["REQUEST_URI"] contains /_vti_bin/ or /MSOffice/.
Anybody have any ideas how I might be able to quickly and elegantly check if a string contains any forbidden substrings?
Thanks
My mistake, try this:
<?php
$strings = array('/_vti_bin/', '/MSOffice/');
foreach($strings as $temp){
if(strpos($_SERVER["REQUEST_URI"], $temp)!== false){
die("don't send email");
}
}
[send email]
?>
Andrew