Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Loose and strong email address ecurity

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 345
Location: Kathmandu, Nepal

PostPosted: Thu Jul 08, 2010 11:01 am    Post subject: Loose and strong email address ecurity Reply with quote

I am referring two plugins here, modifier.email.php and modifier.HTMLSpamFilter.php. See the source codes.

Code:
<?php
$smarty->assign('email', 'email@domain.tld');
?>


Loosely protected email address, by replacing dot and at signs. TPL:
Code:
{$email|email}

It produces: email(at)domain(dot)tld

Tightly secured email address, by encrypting every characters. TPL:
Code:
{$email|HTMLSpamFilter}

It produces: &#x65;&#x6d;&#x61;<!--62-->&#x69;&#x6c;&#x40;<!--19-->&#x64;&#x6f;&#x6d;<!--23-->&#x61;&#x69;&#x6e;<!--44-->&#x2e;&#x74;&#x6c;<!--18-->&#x64;

Only a human can read this as a valid email address.
_________________
Project Manager and Senior Programmer (Bimal Poudel)
Smarty Framework - use it now
Sanjaal Corps, Organized freelancing provider

Hire me in oDesk immediately | Professional support | Personal URL
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP