Silvan over at techblog.tilllate.com has done some research results for us on the best ways of obfuscating email addresses on a web page.
The method used involved nine different code snippits and came up with three over a period of one and a half years that received zero spam.
The Three Methods:
- Changing the code direction with CSS:
-
-
span.codedirection { unicode-bidi:bidi-override; direction: rtl; }
-
</style>
-
<p><span class="codedirection">email@domain.com
</span></p>
- Using CSS display:none:
-
-
p span.displaynone { display:none; }
-
</style>
-
<p>email@
<span class="displaynone">null
</span>domain.com
</p>
- ROT13 Encryption (using rot13 or str_rot13):
-
-
document.write("<n uers=\"znvygb:fvyinasbbone10@gvyyyngr.pbz\" ery=\"absbyybj\">".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(cc=c.charCodeAt(0)+13)?c:c-26);}));
-
</script>silvanfoobar’s Mail</a>
See more about this at techblog.tilllate.com. I noticed he didn’t other methods that I’ve seen such as breaking out the email address in a non-visible table, etc.
Have any other tips to obfuscate email addresses? Let us know in the comments.
Hackosis.com just added Gravatars to the comments section! In light of the situation I decided to tell you how to add Gravatars to your custom Wordpress theme’s comment section if not already done. Most old themes won’t have this.
Gravatars can be used in Wordpress 2.5+ and must be enabled in the Wordpress settings under discussion.
From the Gravatar site:
What is a gravatar?
A gravatar, or globally recognized avatar, is quite simply an avatar image that follows you from weblog to weblog appearing beside your name when you comment on gravatar enabled sites. Avatars help identify your posts on web forums, so why not on weblogs?
To add Gravatars I simply added the following to my Wordpress theme’s comments.php file right before “<cite><?php comment_author_link() ?></cite> Says:”. Of course you do need to include the PHP opening and closing tags. Change the size variable to one suitable:
echo get_avatar( $comment, $size = '50' );
-
echo get_avatar
( $comment,
$size =
‘50′ );
You can also change the default avatar by specifying it’s location like below :
echo get_avatar( $comment, $size = '50', $default="/path/to/url.jpg" );
-
echo get_avatar
( $comment,
$size =
‘50′,
$default=
"/path/to/url.jpg" );
I did also add a bit of styling to float it to the right and add a border, but I’ll let you be creative and do it yourself.
Let me know how it goes and if you have any questions I’ll do my best!
Feel free to test the Gravatars by commenting below (this is your one chance for free-for-all commenting). Happy Gravataring.
PHP and MySQL are one of the most used technologies on the web today. By using about 7 different script files we can add, update, and delete rows from a MySQL table.
Example of completed project:

Download the Simple PHP MySQL Table Editor.
Lets get started. I will explain each section of the script files so you have an understanding of how it works. You can download the project in a zip file above. The download also includes the example MySQL schema structure so you can test the script right away.
All examples in this post assume that you have already typed the php opening and closing tags. I cannot inlcude them on my page due to Wordpress plugins that I am running.
ALSO, because my PHP color coder sometimes runs off the page, you may have to click “show plain code” to view all typed PHP code.
HEADER.PHP:
Header.php stores the HTML header that include the title, etc. I am not going into detail since this is not a HTML tutorial.
I always start my PHP files with comments to indicate the purpose of the script and give contact details in case anyone has questions. Comments in PHP are indicated with ‘//’ for single lines and ‘/*’, ‘*/’ for multiple line comments:
Read the rest of this entry …
There might be many cases where different output would want to be displayed differently depending on where someone is accessing a web page from.
A HTTP referer “identifies, from the point of view of an internet webpage or resource, the address of the webpage, of the resource which links to it”.
Below is a simple way to change the output of your web page based on HTTP referrer:
$referrer = $_SERVER['HTTP_REFERER'];
if (preg_match("/hackosis.com/",$referrer)) {
echo "Your referrer is correct.";
} else {
header('Location: http://www.hackosis.com/');
};
-
$referrer = $_SERVER[‘HTTP_REFERER’];
-
-
echo "Your referrer is correct.";
-
} else {
-
header(‘Location: http://www.hackosis.com/’);
-
};
What the above code will do is redirect anyone that doesn’t have a referrer that has ‘hackosis.com’ somewhere in the URL to your homepage. You could also state a message such as “Hotlinking images is not allowed”. In this case it would be appropriate to display the image in the first part of the if statement.
I hope you find this helpful and if you need any other tips on PHP code snippets, please let us know in the comments.
HP just announced the release of a new Windows security tool named Scrawlr - “SQL Injector and Crawler”.

image by cogdogblog
Scrawlr will crawl up to 1500 pages on your web site to check for the possibility of SQL injection points. More info:
Technical details for Scrawlr
* Identify Verbose SQL Injection vulnerabilities in URL parameters
* Can be configured to use a Proxy to access the web site
* Will identify the type of SQL server in use
* Will extract table names (verbose only) to guarantee no false positives
Scrawlr does have some limitations versus our professional solutions and our fully functional SQL Injector tool
* Will only crawls up to 1500 pages
* Does not support sites requiring authentication
* Does not perform Blind SQL injection
* Cannot retrieve database contents
* Does not support JavaScript or flash parsing
Download Scrawlr from the HP site. [via hackademix.net]