iScramble is a PHP script that allows you to
protect sections of your HTML code from prying eyes. It scrambles the
text into a form that is not human readable, and generates some
JavaScript code to descramble it.
iScramble
Introduction
iScramble is a PHP script that allows you to protect sections of your HTML
code from prying eyes. It scrambles the text into a form that is not human
readable, and generates some JavaScript code to descramble it.
The JavaScript generated is self contained. It includes the scrambled text
and code to descramble it.
iScramble can scramble any HTML code. It is particularly useful for hiding
email addresses from email address harvesting robots. If you place your email
address in plain text on a page on your site, chances are that it will be found
by one of these harvesters, and your email address will be sold to spammers. Use
iScramble to prevent this.
The downside of this technique is that it relies on JavaScript running on the
web browser. A visitor to your site does not have JavaScript enabled, they
will see a message asking them to enable it instead of the protected HTML. Web
browsers have JavaScript enabled by default, so the majority of people have
JavaScript enabled in their web browsers.
Using iScramble
There are 2 ways to use iScramble:
- Server side (PHP) Encryption
- Online Encryption
Server Side (PHP) Encryption
Using iScramble is simply a matter of including the php code, calling the
iScramble() function passing in text that you want to scramble, then
echo the returned string.
For example:
<?php
// Include the iScramble PHP function
require_once("iscramble.inc.php");
echo iScramble("private@somewhere.com");
?>
Example
This paragraph is scrambled with iScramble. Try doing a "view source" from your web browser, then look for this text.
<I>[Please Enable JavaScript]</I>
How Secure Is It?
iScramble is secure enough to deter casual visitors to your site from viewing
your HTML source. It is also secure enough to prevent SPAM email address
harvesting robots. However, it is not completely secure. It would be possible
for an attacker to decrypt your original plain text. It is a deterrent, but
seems to work well. I use it on several sites to protect email addresses, which
would otherwise have ended up on spam lists.
|