Game Developer, Choreographer

PHP

If you want to create AVM2 swfs from PHP

Posted on

If you want to create AVM2 (Actionscript 3) swfs from PHP then this file may be useful. It creates the number formats used in AVM2 swfs. I created these functions for the SWX project and am releasing the code under the MIT licence so it can be used in other projects too. Continue reading →


PHP Password Security

Posted on

If you build websites that require users to register it's your responsibility to keep their passwords safe. And if you're storing the passwords in plain text then you're not doing your job properly. What happens if your database is stolen? It's not just your site that is compromised. Since most users use the same password on multiple sites, all those sites have also been compromised. Continue reading →


Managing 404 errors in the Zend Framework

Posted on

In the Zend Framework there's no obvious way to deal with all page not found errors in one place, including instances where the controller doesn't exist and where the action doesn't exist. In this post I show the code for a Zend Framework plug-in to handle all 404 errors in one place only, automatically displaying the 404 error page if the Controller or Action aren't defined. Continue reading →


Zend_View helpers in include path

Posted on

I'm using the Zend Framework at the moment and came across a problem with creating custom helpers for the Zend_View class. All is fine if you place your helpers either within the zend framework's own helpers folder (not a good idea) or within a directory in your site structure. The problem arises if you place the helpers in a folder in the PHP include path and don't know the full path to the folder. Continue reading →


PHP mail() function and GMail

Posted on

or Another reason to avoid PHP's mail() function. Continue reading →


PHP 5.2 - Nesting level too deep - recursive dependency?

Posted on

I installed PHP 5.2 on my testing server today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was "Nesting level too deep - recursive dependency?" and it took a little time to track down the root of the problem. Here's what happened. Continue reading →


Dates in PHP and MySQL

Posted on

I see a lot of people on forums and on my training courses asking about the best way (or any way) to manage dates stored in a MySQL database and used in PHP. Three options follow, but first the problem. Continue reading →