Latest articles under PHP category

PHP exception handling.

I normally post tutorials, how-tos or the likes. This post is a little bit different than the others. It’s more like a thought that I came across when I finally decided to use PHP’s exception handling. Here’s the basic form of PHP’s exception handling. The purpose of having the ability to have multiple catch blocks […]

Posted on August 23rd, 2009 under PHP  •  No Comments

XML and Ampersand (&)

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 […]

Posted on August 4th, 2009 under General / Algorithm, PHP  •  3 Comments

_PHPLIB[libdir] Cross Site Scripting Exploit Explained

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. […]

Posted on July 21st, 2009 under PHP, Security  •  No Comments

Comparing 2 dates in PHP – A better way

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 […]

Posted on July 11th, 2009 under PHP  •  11 Comments

Remote debugging PHP using Xdebug on MAMP

A development tools such as Microsoft Visual Studio has debugging feature built-in where you can step through the code line by line and watch the variables. There are times when you may want to do the same thing with PHP script running in a remote (or it could be local as well) web server. It […]

Posted on May 21st, 2009 under MacOS X, PHP  •  2 Comments

Page 1 of 212