Class: FakeEmail
- Package: saf.Misc
- Author: John Luxford <lux@simian.ca>
- Copyright: Copyright (C) 2001-2003, Simian Systems Inc.
- License: http://www.sitellite.org/index/license Simian Open Software License
- Version: 1.2, 2003-05-23, $Id: FakeEmail.php,v 1.3 2007/10/06 00:06:30 lux Exp $
- Access: public
A class used to generate obscured email addresses, so as to make it
more difficult for spambots to recognize them.
New in 1.2:
- Moved from saf.EasyText.FakeEmail to saf.Misc.FakeEmail.
- Removed the EasyText() and EasyTextInit() methods.
Usage Example
<?php
echo FakeEmail::makeWords ('you@yoursite.com');
echo FakeEmail::insertComments ('you@yoursite.com');
echo FakeEmail::obfuscateLink ('you@yoursite.com');
?>
Return to Top
Properties
$vals
List of values to alternate between.
$counter
The internal position counter.
$current
Always keeps the value of the current array position here.
$headers = array ()
List of HTTP headers to be sent with the document. @see addHeader()
$meta = array ()
List of metadata attributes, which can be rendered as HTML meta tags using
the makeMeta() method. To render them into your XT templates, simply
add an xt:var tag with the name "makeMeta".
$scripts = array ()
List of javascript scripts, which can be rendered as HTML script tags using
the makeJavascript() method. To render them into your XT templates, simply
add an xt:var tag with the name "makeJavascript".
$styles = array ()
Array used to prevent duplicate loading of stylesheets.
$template_set = 'default'
The template set to use for output.
Return to Top
Methods
makeWords ($addy)
- Access: public
- Return: string
Doesn't display the address as a link, but turns the various symbol
characters into words and spaces the address out so that it reads properly
aloud, but it doesn't look like an email address.
insertComments ($addy)
- Access: public
- Return: string
Doesn't display the address as a link, but inserts comments into
it so as to make it difficult to read the address in the source code, but
so that it still displays on the page as a normal address.
obfuscateLink ($addy)
- Access: public
- Return: string
Still provides a mailto link, but obfuscates the email address
inside the anchor link tag by converting various characters into alternate,
but valid, encodings.
doAll ($addy)
- Access: public
- Return: string
Provides all three obscuring methods in one, which means it will
display as 'you at yoursite dot com', but will provide a mailto link as well.
Return to Top