I installed a PHP helpdesk for people to get help with our services.
I created a email system that will pipe to the helpdesk.
Now the helpdesk is getting spammed.
I found the email parse script and I'm trying to add some of the popular key phrases to a preg_match and if it exists, exit out, and not create the message on the system.
Here is what I have so far(I am a Perl guy, and don't know enough about PHP to accomplish this, sadly)
$_pattern = 'Viagra';
preg_match($_pattern, $subject, $_matches);
if ($_matches) {
exit(0);
}
$_pattern = 'Want it bigger?';
preg_match($_pattern, $subject, $_matches);
if ($_matches) {
exit(0);
}
But I get this error returned to me when I test this:
PHP Warning: preg_match(): Delimiter must not be alphanumeric or
backslash in /home/user/public_html/helpdesk/parser.php on line 77
Warning: preg_match(): Delimiter must not be alphanumeric or backslash
in /home/holytea/public_html/helpdesk/parser.php on line 77
PHP Warning: preg_match(): Delimiter must not be alphanumeric or
backslash in /home/user/public_html/helpdesk/parse.php on line 82
I don't know how to do a search all in one, Like I can in Perl, so I added a bunch of different preg_match searches, I did not put them all on here(they are identical) because they have some words I'd rather not subject people to.
Anyhow, please point me in the right direction.
Thank you.
Richard