You are here: Re: Form Validatioin « All PHP « IT news, forums, messages
Re: Form Validatioin

Posted by J.O. Aho on 04/23/06 07:25

Brian wrote:
> Hi
>
> I have been having a lot of trouble of late with somebody trying to use my
> form script to send Spam.
>
> I have tried to lock them out but they keep changing IP address and I can't
> so
> I have removed following line to stop the emails, but I still get crap
> though
>
> $headers .= "From:$Email <$Contact_Name>\n";
>
> So I am now going to have to look at a better way of Form Validation
>
> I found this script on the net to validate the email address, seem to work
> fine (see below)

When one spammer knows about an ill written mail-form, it don't tkae long
before the rest of them knows and open proxies are one thing they do use
(sadly many proxies seems to have it as default to accept all).

The "from" has the bad thing that you can add extra mail-headers as Cc: and
Bcc: and you should filter those out in your "from". As each header ends with
\r\n (I think it was this order), you want to remove those too.

You can read the user comments for mail(), there are some good tips what to do
http://www.php.net/manual/en/function.mail.php


> Second, can anybody point me in the right direction to add one of those
> things where the user has to type in a number, but the number is shown as a
> distorted graphic I'm guessing I need to set a cookie or something and they
> test for it when the user types in the number. It there a graphic library to
> do this?

Sorry, not seen any such, but think it's possible to make your own in worst
case that uses gd.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация