Once it was said...
   
2002-01-23 03:17:40-05
 
 
  
Antispam Tricks

I finally got around to setting spam-harvester protection on my webpages. I think it's kind of a cool little widget, so I figured I'd post it in the hopes that someone else out there who uses Roxen could use it.

Just stick the following chunk of RXML into one of the files that you load for the pages that have e-mail addresses, then just wrap them inside the tag. If Roxen sees a robot, or something it has no idea what it is, the address gets replaced with a graphic version. Otherwise, it remains a clickable link (with some slight protection just in case).

   code   
  

<define tag="cloak">
	<cache days='1' shared='y' variable='client.name,_.email'>
		<if supports='robot' or='' supports='unknown'>
			<gtext alt="Spamproof Address">&_.email;</gtext>
		</if>
		<else>
			<replace from='@,.' to='&#64;,&#46;' type='words' separator=',' >
				<A HREF="mailto:&_.email;">&_.email;</A>
			</replace>
		</else>
	</cache>
</define>
<comment>
use like this:
	<cloak email='r00t@localhost' />
</comment>




reply

And you replied...
Name:
E-mail:
Web: