English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi i have a simple form script, how would i stop a cgi form from allowing a spammer from writing junk information through my form mail script to a text file if their input contains certain words like viagra or levitra? for instance, if $input does not contain "viagra,levitra" then do this: open and write the contents to this file,
however, if $input does contain "viagra,levitra" then don't write to the text file but don't just die, just skip the part about writing to the text file and continue down the script and email the user so that the spammer doesn't realize it's not writing their junk mail on the text file for these flagged words.
thanks,
jr

2007-02-03 16:44:25 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

if ($input =~ /cialis|viagra/){
# laugh
}
else {
actually send it
}

don't die... that would give a clue to the spammers!

Your site has been marked by the spammers! consider closing down the cgi and just having an share the word!

without the extraneous spaces!

and avoiding the whole issue!

2007-02-03 17:26:36 · answer #1 · answered by jake cigar™ is retired 7 · 0 0

Unfortunately, the spammers have long ago figured that people are filtering out "viagra", "cialis", etc., and send lots of messages selling viakgra, cia|is, and such. It might make more sense to filter out html, or just reject any messages with html tags in it.

2007-02-04 01:35:44 · answer #2 · answered by injanier 7 · 0 0

fedest.com, questions and answers