PHP

Posts about the server side scripting language PHP

Playing With ReactPHP

Monday, November 19, 2012 - 10:00

I recently saw an implementation of a Twitter wall that used node.js to run searches on Twitter and post the results on a webpage. I had been wanting to create something using ReactPHP so I thought this was a good opportunity to have a go. ReactPHP, if you haven't heard of it, is an event-driven, non-blocking I/O that is essentially the PHP equivalent of node.js. The major difference is that ReactPHP is written in pure PHP with no extra components, whereas node.js is a collection of different programs, interfaces and languages.

Category: 

Happy Birthday PHP Script

Monday, October 29, 2012 - 11:43

When posting happy birthday messages to developers over social media I like to write it in code, just to be geeky. The following code will print the happy birthday song using PHP.

Category: 

PHPNW12: A Review

Saturday, October 20, 2012 - 14:58

The annual PHPNW conference gets better every year, and this year was no exception. I have been going to the PHPNW conference since their inception in 2008 and this year I was lucky enough to be involved in some of the pre-conference organising and helping out over the event.

Category: 

Testing Websites With Selenium And PHP

Monday, July 16, 2012 - 10:14

Selenium is an application that allows automated testing of websites through a browser and consists of a number of different components. It allows the creation of browser tests that perform certain actions, which can then be run again at a later date. Three components are required to allow Selenium to run tests through PHP. These are as follows:

Category: 

UK PostCode Validation Function In PHP

Monday, May 21, 2012 - 22:45

Creating a function to validate UK postcodes would seem like a simple task, but there is a little more to it than checking the number of characters. In fact there are several different variants of UK postal codes, especially if you include BFPO and overseas addresses.

Category: 

PHP fgetcsv() Gotcha

Saturday, May 19, 2012 - 17:36

I quite often find myself with the need to pull the data from a CSV file into a system. This might be to fill out essential data like postcodes or to update a site with new content. What system I happen to be using dictates how I pull in the CSV file, but writing a quick parser is quite easy in PHP via the use of the fgetcsv() function.

Category: