Home | Actions library | Anti Spam
Download Freeway Actions

Actions for Freeway


Actions for Freeway


Actions for Freeway

What is Freeway

Actions for Freeway

All about Freeway actions

Actions for Freeway

Freeway ActionsWhat are actions?

Actions for Freeway

Actions for FreewayInstalling actions

Actions for Freeway

Freeway Pro ActionsApplying actions

Actions for Freeway

Plug-ins for FreewayHandling errors

Actions for Freeway

Extend FreewayAction types

Actions for Freeway

Templates for FreewayWriting actions

Freeway Actions

Actions library

Actions for Freeway

Beta Box

Actions for Freeway

Custom development

Actions for Freeway

Action links

Actions for Freeway

Site map

Actions for Freeway


Free templates for Freeway


To purchase this action please click on the 'Buy now' button below.
All purchases are delivered automatically and immediately by email.

Anti Spam


All payments are made securely using our Paddle online store.


FatCow are a Freeway-friendly web host and offer everything a Freeway Express or Freeway Pro user need to get their sites online fast, and hassle free.
This Action is Freeway 7 ready!

Anti Spam
Version 2.2

Description: Adding e-mail links to web pages is very easy with Freeway and is a great way to get some direct feedback from your site's viewers but comes with a hidden danger.
Both online and offline applications are available that allow these e-mail links (otherwise known as mailto links) to be easily 'harvested' with the intention of building databases for sales purposes. Normally what will happen is that a 'spam bot' will crawl a web site looking for anything that looks like an e-mail address. Once located it will add this information to its database which is subsequently sold on. It isn't too hard to find these databases for sale on the internet that offer thousands of 'potential customers' for your service or product.
The art of sending unsolicited e-mails (commonly known as spamming) is generally frowned on by those that receive such e-mails and it will almost certainly have a negative effect on the company or organization undertaking it.

Anti Spam manages to get around the problem of these spam bots by encoding these mailto links in such a way that the e-mail address becomes nothing but a series of codes that are useless to anything other than a web browser.

To do this the action can employ one of seven different methods to encode the e-mail address. Each has its benefits and drawbacks and generally supersedes the last method in its security and power.
The encoding options are;

  1. Entity encoding
    Character entity substitution where each character of the e-mail link is replaced by its associated entity value.
    Although this has the benefit of being compatible with all browsers it 'could' become susceptible should any of these spam bots choose to target this encoding method in the future.
  2. Randomized codes
    Randomized codes encodes the e-mail link in much the same fashion as entity encoding but puts a spin on the whole concept by, you guessed it, mixing up the encoding method for each of the elements of the address. Any modern Web browser will effortlessly decode the string of random codes leaving spam bots still looking for the e-mail address.
  3. JavaScript link slicing
    This option uses JavaScript to split the e-mail address into chunks and only place them back together, in memory, when the link is clicked on. If you are concerned that e-mail addresses could still be harvested once they are entity encoded (method one) and you are sure that the majority of your target users will have JavaScript enabled then this could be your best solution.
  4. Randomized JavaScript link slicing
    A lot like JavaScript link slicing this option encodes e-mail addresses using both a randomized key as well as splitting the resulting code into randomized data chunks. These are only reunited and decoded in JavaScript when the link is clicked.
  5. JavaScript encoding
    This option is for the paranoid web developer where the links are encoded using JavaScript. We increase the chances against the code being broken by randomizing the 'key' that encodes the links and in doing so the links become very hard for a spam bot to decode. Since the spam bot does not know how the link is encoded it will simply harvest what seems to be a random set of numbers. Although JavaScript encoding is much more secure it will require a browser that supports JavaScript version 1.1 (IE and Netscape version 4 or above for example).
  6. Protect using PHP
    For users with access to PHP enabled web space the PHP protection method offers a way to remove the recipient's e-mail address from the HTML page without having to encode it at all. The standard e-mail link is replaced with a link to a new PHP page that, in turn, forces the browser to open the e-mail address. Because the address is contained inside the PHP code it cannot be harvested.
  7. Protect using ASP
    This option is exactly like the PHP option above but uses the power of ASP rather than PHP to do its stuff. Ideal for users with access to ASP enabled servers.

An example:
Here is an example of a (fictitious) e-mail link and its associated code;
e-mail me here
<a href="mailto:info@mydomain.com">e-mail me here</a>

Here is the same e-mail address after Anti Spam has encoded it using randomized link slicing method;

<script type="text/javascript"><!--document.write(unescape('%3Ca h%72%65%66=%22'+'m%61i%6C%74'+'%6F:%69%6E%66o%4'+'0%6Dyd%6F%6D'+'ai%6E.%63%6F%6'+'D%22 t%'+'69t%6Ce=%22C'+'l%69%63k %74o e-'+'m%61i%6C %6De%22%3E'+'%65-m%61i%6C '+'%6D'+'%65 he%72%65%3C'+'/a%3E'));//--></script></p><noscript>Please enable JavaScript to view this email link</noscript>

Adding the action to your web pages:
To add this action to all pages in a folder or every page in the site follow the ' Applying Folder Actions ' guidelines.
To add this action to individual Freeway pages follow the ' Applying Page Actions ' guidelines.
Applying the action to a specific text box is just as simple and follows almost the same routine. Simply follow the ' Applying Item Actions ' guidelines.

Using the action:
Using the action is very easy.
Once applied to either a text box, page or folder (see the 'Adding the action to your web pages' section above) the action's controls can be set using the actions palette (Window/Actions menu). In the palette you will see that the controls are split into two distinct sections; the first allows you to set options for mailto (e-mail) links and the second for e-mail addresses found in either HTML text or form fields. Looking at the 'Mailto' links section to start with the 'Encode' popup menu allows you to select the encoding method outlined previously. All mailto links found within the scope of the action (either folder, page or text box) will be encoded using this method.
The 'Add custom text' section allows you to add a tooltip (title attribute) or status bar message to the newly encoded e-mail link. Both are useful to give feedback to the user about the link. You should, however, avoid using the e-mail address in either of these as both are displayed as un-encoded text.

The Anti Spam palette
Figure 1.1 - Anti Spam's interface

The second part of the action interface allows us to encode e-mail addresses found in the HTML as both plain text and within the values of a form field. If you have e-mail addresses displayed as plain text but not linked then this option will hunt these out and encode them using the 'Randomized codes' option mentioned above.

The E-mail collection policy section of the action is based on the work of UnSpam.com and allows you to easily add an e-mail collection policy to your site.
Although this doesn't actively stop spammers collecting e-mail addresses it does give you a legal leg to stand on in stating how you expect e-mail addresses on your sites are to be used.
You can choose to use the default policy at UnSpam.com or select your own by simply linking to an existing internal or external HTML page.

W3CAs of version 2.2 the action's output now fully validates at all HTML levels regardless of the encoding method used.

To add Anti Spam's functionality to your web pages you will need either;

  • Freeway Pro 3, 4, 5, 5.5, 6 or 7
  • Freeway Express version 4, 5, 5.5 or 6

This action will not run in any version of Freeway Express prior to version 4.

Browser & server compatibility:
The link encoding for the entity encoding method and randomized codes options is done in Freeway prior to the browser receiving the code and is therefore compatible with even some of the most basic of browsers.
JavaScript link slicing and Randomized JavaScript link slicing both require a browser that supports JavaScript version 1.0 or later.
JavaScript encoding requires a browser that supports JavaScript version 1.1 or later.
The PHP and ASP options require servers available to run these technologies respectively.

Anti Spam 2 is a free upgrade for registered users of all previous versions of the action. If you haven't already received an upgrade notification e-mail with details on how to upgrade then please contact us with details of your original transaction ID number.

Actions for Freeway
Freeway actions