I’m not sure if many programmers know this. But it’s always a good thing to make sure that they (including me) do. XML specification doesn’t allow ampersand (&). Here’s a quote from W3c.org XML recommendation with bold emphasis added by me.
The ampersand character (&) and the left angle bracket ( 5C’. How would you write [...]
Posted on August 4th, 2009 under General / Algorithm, PHP • No Comments
As you may know, Microsoft released its search engine (they call it decision engine) sometime last June 2009. The new search engine is bing. Since they launched, I’ve been waiting for an update of StatPress to include bing. After waiting for almost 2 months with no updates, I thought I’ll take matters into my [...]
Posted on July 23rd, 2009 under Administration • No Comments
Lately, I’ve seen an increased attack of bad people trying to run XSS exploit on this website using _PHPLIB[libdir] exploit. It alarmed me a bit as I didn’t really know about that particular exploit. Obviously I wanted to make sure that my site is not vulnerable for it. So I did a little bit digging.
For [...]
Posted on July 21st, 2009 under PHP, Security • No Comments
If you Google around for php compare 2 dates, (at the time of this writing) typically they suggest for you to convert the date string into some integer using mktime() or strtotime(). Both the functions returns you Unix timestamp.
Understanding Unix Timestamp
In my other article, I mentioned that one of the golden rule of programming is [...]
Posted on July 11th, 2009 under PHP • No Comments
A lot of times, I saw programmers use COUNT(*) and check if the result is greater than 0 to see if a particular record exits in a table. If your only purpose is to know if a record exists or not and you don’t really care about how many matched records are there, the better [...]
Posted on June 30th, 2009 under General SQL • 3 Comments