Jan 31, 2011
Clean Up User-Input & Convert Line-Breaks To BR-tags
A simple PHP function to clean up user input. It does following: converts & to & converts < to < converts > to > converts “ to " and converts line-breaks to <br /> The Function: 123456function clean($str) { $str = preg_replace(’/&(?!#[0-9]+;)/s’, ‘&’, $str); $str = str_replace(array(’< ‘, ‘>’, ‘"’), array(’<’, [...]
Jan 25, 2011
What if Visual Studio had Achievements?
What if Visual Studio supported achievements, just like games on Steam, Xbox or PS3? Bragging to your coworkers about which one you’ve just unlocked, imagine that! Here’s a little proposed list for some of them. .NET / C# flavored, of course. Falling Down – Created a new SharePoint project Job Security – Written a LINQ [...]
Dec 24, 2010
Merry Christmas!
The Source: 12345678910111213141516171819202122010011010110010101110010011100100111100100 100000010000110110100001110010011010010111 001101110100011011010110000101110011001000 000111010001101111001000000110000101101100 011011000010000001101111011001100010000001 111001011011110111010100100001000011010000 101000001101000010100100010101101110011010 100110111101111001001000000111100101101111 011101010111001000100000011010000110111101 101100011010010110010001100001011110010111 001100100000011000010110111001100100001000 000111001101110000011001010110111001100100 001000000110000100100000011001110111001001 100101011000010111010000100000011101000110 100101101101011001010010000001110111011010 010111010001101000001000000111100101101111 011101010111001000100000011001100110000101 101101011010010110110001111001001000000110 000101101110011001000010000001111001011011 110111010101110010001000000110110001101111 011101100110010101100100001000000110111101 101110011001010111001100100001
Dec 22, 2010
Check for AJAX Request in PHP
A simple PHP function to check if the request comes from an AJAX XMLHttpRequest.
Recent Comments