|
Posted by Brian on 03/25/06 20:28
"John" <liezlsimms@absamail.co.za> wrote in message
news:oKGdnV8YVICRe7zZnZ2dnUVZ_sadnZ2d@is.co.za...
> if(isset($_POST['Submit'])){
> foreach( $_POST as $value ){
> if(strpos($value,'Content-Type:') !== FALSE ){
> mail('email@address.com,'Spammer Bot Attempt on
> Website',$_SERVER['REMOTE_ADDR']);
> exit();
> }
> }
>
>
> "Brian" <not@given.com> wrote in message
> news:mG_Qf.2015$ZJ2.197@newsfe6-gui.ntli.net...
>> 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
Thanks for your help guys, got them locked out now, trouble is they
were bouncing IP address from all over the place and we couldn't track
them :(
Brian
Navigation:
[Reply to this message]
|