You are here: Re: Security Needed! « All PHP « IT news, forums, messages
Re: Security Needed!

Posted by Blackhawk on 02/18/06 05:43

On Sat, 18 Feb 2006 00:11:02 GMT, bish <info@bish.org> wrote:

>On 17 Feb 2006 11:04:08 -0800, "ZeldorBlat" <zeldorblat@gmail.com>
>wrote:
>
>>>>
>>>>Blackhawk@idonthaveone.com wrote:
>>>>> I have a guest book and someone is raising hell with me on it. I must
>>>>> receive 50 entries a day and all bogus. Don't know why they have
>>>>> picked my site but I have to do something now to correct the on going
>>>>> problem.
>>>>>
>>>>> I need a security feature for my guest book. I have seen some on other
>>>>> boards where there is a series a letters and or numbers only the human
>>>>> eye can pick out and enter in order to submit an entry into the guest
>>>>> book. Can someone direct me to the source of this security script in
>>>>> php, please!
>>>>
>>>><http://www.google.com/search?q=captcha>
>
>I'm not a php expert, and the following kludge will doubtless
>offend the purists, but my restaurant site no longer struggles
>under the 200 or 300 daily entries it used to.
>Hope the comments make sense.
>
><?
>
>// anti-spam header location;
>// stops people posting with an e-mail address ;
>// supposedly coming from your domain name ;
>if (strpos($email, "@your_domain"))
>{
>header("location:guest_book_entry.php");
>exit();
>}
>
>// I have only 4 fields on my guest book;
>// check for any blank fields;
>if ((!$firstname) || (!$surname) || (!$email) || (!$comments))
>{
>header("location:guest_book_entry.php");
>exit();
>}
>
>// check to decline successive entries of data from ;
>// identical sources. The snag with this is that a genuine ;
>// entrant may wish to enter a correction. If s/he is the very ;
>// next entrant this correction will not be accepted. ;
>// However, we answer all guest book entries within 24 ;
>// hours by e-mail, so that is their chance to correct things.;
>include("php-lib/connect_inc.php");
>$TableName="your_guest_book";
>$Query="SELECT * FROM $TableName order by id desc limit 1";
>$Result=mysql_db_query ($DBName, $Query, $Link);
>while ($Row=mysql_fetch_array ($Result))
>{
>if ( ($firstname==$Row[firstname]) and ($surname==$Row[surname]) )
>{
>header("location:guest_book_entry.php");
>exit();
>}
>}
>
>?>
>
>Hope This Helps.

Good stuff! This gives me something to work with now. Let me see what
I can do with this.

Thank you!

 

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

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