Reply to Form checking

Your name:

Reply:


Posted by Richard Lynch on 10/07/79 11:08

I got trigger happy and deleted the post requesting info on interesting
ideas for form checking.

To stop the automated link farms from trying to insert their stupid crap
into your guestbook/blog/whatever, you may want to experiment with
something like:

if (strlen($message) / strlen(strip_tags($message)) > 1.3){
//ignore bogus HTML post
}

You still want to sanitize the HTML content, of course, but this gets rid
of those annoying pointless posts. At least, it has so far for me...

Vary 1.3 depending on your current (clean) data. Run a quick PHP script
to suck down all the entries, and compute the ratio (as above) for each,
and keep track of the highest ratio of html to text.

Then choose a number higher than your highest ratio so far, and run with
it for awhile.

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original 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

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