PHP Help

I tried to fill out the form and I got this message

Thank you for your inquiry.

Thank you for your feedback. Your comments and suggestions are much appreciated. Note that although I read every comment sent to me, it may not be possible for me to reply to every message.

File does not exist!


It looks like when you submit the script, variables like mime and mime-version are being saved to the data structure "postVars."

The script (code below) tests whether those variables are set. If they are set, trip the spam condition.

So on your second consecutive execution of the script, you will trip the condition. This is protecting against spammers.

PHP:
if (ereg("mime-version", $postVars) || ereg("mime", $postVars) || ereg("bcc", $postVars) || ereg("cc", $postVars)) {
mail("jewelzz@studipsp.com", "Form Hijack Attempt", "A spam relay was attempted from the StudioPSP and was blocked.","From:SpamMonitor");
echo "<p align='center'>Sorry, you may not spam this website.</p>";
//No form provided
die();
}
 
Last edited:
I want protection against spammers but some people might want to contact the owner more than once, is there a way to fix this?
 
I was able to just use the back button and resubmit the form. I did not receive any error or spam message from the script. Give this a try.
Add this to the "Thank You" page.
<a href="javascript:history.go(-1)">Send another message.</a>

-----

Another option would be:

You could check whether the person using the script came from your site or is accessing the script directly from some other location. You could scrap the original spam check.

PHP:
// Determine if server name is in referer value (ex. is albybum.net in http://www.albybum.net/foo)
// if expression is not null and not false, allow something
if(stristr($_SERVER['HTTP_REFERER'],$_SERVER['SERVER_NAME'])!=""&&$_SERVER['SERVER_NAME']!=false)
{
// Refferer check ok, do something
}

This would be less desired because referer information can be "spoofed" and some legitimate users might be turned away. For instance if someone came to your contact page directly from Google.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back