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
   
2003-08-12 02:28:12-05
 
 
  
Pathwalker
click to email

A while ago, I wrote an updated version of this that always encodes the addresses as a graphic, and provides a form for sending an email to the named person.

It's described here and can be downloaded here.


reply

click to email
discussion/thoughts/hungerf3/house/ofdoom.com