Using the composition pattern to generate, clean, well organised, flexible object orientated PHP code is a popular method with todays web programmers. Below is an example of two possible approaches to store a reference of one object to another - a form of composition.
To inspire some interaction we will give the best comment to […]
Posted on March 10th, 2008 by franktank
Filed under: PHP | No Comments »
Validating language specific characters in user input can be a bit of a pain, especially if you are using regular expressions to filter user submitted data.
Not only that, but testing your methods can also be a pain - firstly you will need some shortcuts for entering UTF-8/Unicode chars into form inputs if you […]
Posted on March 9th, 2008 by franktank
Filed under: PHP | 2 Comments »
Error handling is obviously fairly important so I have finally invested time into a custom error handling class for PHP 4 and above. It is a fairly small and simple class (only about 150 lines), I’m quite happy with it so far, of course you can download the class below and try it out for […]
Posted on May 6th, 2007 by franktank
Filed under: PHP, Scripts | 7 Comments »
Having some sort of web 2 point ohish interactive component on your website is a great way to generate buzz, get users coming back to the site and even generate inbound links. One such component I have seen work well is a voting system, made so much more popular by community driven sites such as […]
Posted on April 11th, 2007 by franktank
Filed under: PHP | No Comments »
Today I had to write into an admin area on one of our sites a restriction so that only people at certain IP addresses could log in. I wrote a pretty quick piece of code, but it seems to work nicely enough so I though I would convert it into a quick and dirty php […]
Posted on March 7th, 2007 by franktank
Filed under: PHP | 4 Comments »