posted 10/29/2008 by Chris
Comments: 0

Mailto is a class written by Debugged Interactive Designs in PHP4 to obfuscate e-mail addresses from spam harvesters. The class lets you easily encode an entire anchor tag using ROT13 Encryption. At run-time, javascript is used to decode the ROT13 encryption. If javascript is disabled, then the e-mail address is safely shown by reversing the e-mail address using PHP and re-reversing (versing?) it at run-time using CSS.

posted 10/12/2008 by Chris
Comments: 0

Php5tube is a free, open source class written by Debugged Interactive Designs in PHP5 to act as a wrapper for Youtube's API. Methods process the response XML and return a friendly array of data to make development simple and intuitive...

posted 06/10/2008 by James
Comments: 0

If you're using the function usort inside a cakephp controller and are receiving errors like "Warning: usort() [function.usort]: Invalid comparison function in..." you may be referencing your sorting function incorrectly.

 

Try calling usort this way...

posted 05/27/2008 by James
Comments: 0

Regular expressions can also help clean up input text for more aesthetic purposes. Let's assume we want to convert a blog title into URL-friendly characters...

posted 03/8/2008 by Chris
Comments: 0

Encrypting a password using the md5 algorithm is so easy that you really have no excuse not to use it for saving passwords into your database...

posted 03/7/2008 by Chris
Comments: 0

While regular expressions are often used for input validation, I also find them very useful for cleaning malicious code in user input.  For this I used the function preg_replace.  The idea is that I only allow certain characters through...

posted 03/4/2008 by Chris
Comments: 0

Any input that you get from a user should be cleaned for malicious code.  Here are some simple functions that will help...

Tags: security, php, code