Posted by jukka on 03/13/06 15:40
Brian wrote:
> Hi all
>
> Over the past few weeks I have been getting spam sent
> to myself via my site. Who ever is doing it is sending
> spam via my form process script. I have a standard
> form that gets pasted to a PHP script that formats it and
> sends it to me.
>
> I was using the following
>
> $body = "The body of the email";
> $to = "address@domain.com" ;
> $subject = "Enquiry Form";
> $headers = "MIME-Version: 1.0\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\n";
> $headers .= "From:$Email <$Contact_Name>\n";
> mail($to, $subject, $body, $headers);
>
> Because of all the trouble I have now removed
> $headers .= "From:$Email <$Contact_Name>\n"; but
> still get loads of spam just not as emails, they are now formateed
>
> I am running a strip_tags() on all the info that comes into
> the script and would have thought it would stripped out the crap?
>
> Is there any way to say only run the script if it was posted from a
> given domain (eg mine), I'm hopping that this will stop the spamming?
>
> Thanks
>
> Brian
>
>
LOG THE SPAMMER'S IP AND REPORT THAT MOTHER!
[Back to original message]
|