From: Reini U. <ru...@x-...> - 2004-06-10 12:49:35
|
Steve Wainstead schrieb: > Nothing new here except a higher profile for the idea... > http://news.netcraft.com/archives/2004/06/04/wikis_the_next_frontier_for_spammers.html I wrote now code to forbid inlined images to appear smaller than some size. I want to allow horizontal "one-liners", but disallow "dots". Should a "dot size" of 6x6 be allowed or too small? Is this reasonable? //pseudocode in stdlib.php:LinkImage() // check width and height as spam countermeasure $width = $link->getAttr('width') $height = $link->getAttr('height'); or $size = @getimagesize($url); // checks images at external urls also. $width = (integer) $width; // px or % or other suffix $height = (integer) $height; if (($width < 3 and $height < 10) or ($height < 3 and $width < 20) or ($height < 7 and $width < 7)) { trigger_error(_("Invalid image size"), E_USER_NOTICE); return ''; } -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |