Archive for September, 2008

Simple PHP Email Obfuscation

8

Sep
15

Here’s a simple piece of code that performs PHP based email obfuscation to replace standard characters with an ASCII encoded alternative.

This technique, although simple, will block some of the less intelligent spiders/robots out there. There are many other techniques including using JavaScript to render email address or images or even reversing the email address through CSS, however they all have their pros and cons and remember there isn’t an solution.

<?php

function email_obfuscator( $email )
{
$strArray = str_split( $email );
$obfEmail = '';

foreach( $strArray as $char )
{
$obfEmail .= '&#'.ord( $char );
}

return $obfEmail ;
}

echo '<a href="mailto:'.email_obfuscator('test@test.com').'">'.email_obfuscator('test@test.com').'</a>';

?>

CSS Float Tutorial

9

Sep
15

I regularly get asked to explain CSS floats, how they work and more importantly how to fix the wonderful array of bugs that get thrown up during development.

For this reason I thought it may be a good idea to point everyone in the direction of a very useful article on CSS Tricks. It walks you through the development process for floating content and highlights any issues that may arise and the workarounds.

All in all a very good post and well worth a read if you need a little recap. :-)

View CSS Float arictle

sIFR 3

8

Sep
10

This a quick post to demonstrate the power of sIFR 3. Most of you will have heard about sIFR and its benefits, but for those of you that haven’t “sIFR lets you use your favorite font on your websites by working with Flash, JavaScript and CSS”. It enables developers to build templates as close to the creative as possible without the use of images and compromising accessibility/usability.

Click the link below to see a few of the sIFR showcases I have put together.

I have used sIFR for some time now and decided it was about time that I created a few examples to give a quick overview as to its power.

View the sIFR 3 example