June 9, 2011, 12:25 pm (2 Years, 1 Week, 3 Days, 5 Hours, 46 Minutes Ago) . posted by Matthew Craig
Sanitation
Everyone loves to loves a clean environment... but no one loves to clean. I am no exception. But I understand the need. After working on PHP for years, and discovering no really good libraries out there for data sanitation... I have written my own. (I tried to use OWASP's ESAPI... but gave up...)
Definition:
According to google Sanitation is "Conditions relating to public health, esp. the provision of clean drinking water and adequate sewage disposal"...
Read More
June 7, 2011, 5:25 pm (2 Years, 1 Week, 5 Days, 46 Minutes Ago) . posted by Matthew Craig
Validation Class for PHP Remix
As a Web developer, I have seen my share of crappy and insecure code out there. (Especially working on other people's code.) One of the biggest problems and security breaches I see is the failure to properly validate data before using it. Earlier this year I started to build a validation library and posted it up on this site. In my programing "evolution" I have learned a few techniques that (in my opinion) are superior to the...
Read More
September 24, 2010, 9:32 am (2 Years, 8 Months, 3 Weeks, 4 Days, 39 Minutes Ago) . posted by Matthew Craig
Random String Generator in PHP
Every programmer at some point needs to generate random strings. Either for testing, salts, garbage data, or even ipsum. Well I wrote a script back in 2008, and it has been buried in a pile of hard disks until just recently. So here is my PHP Random String Generator:
/**
* random_string_generator($length, $char_list)
*
* This function generates a random string that is the size of $length,
* composed of the characters in $char_list.
* @param ...
Read More