Firefox Browser Automation with mozrepl – A PHP Class

Browser automation can be an effective method where command line clients like cURL will fail. There are a number of better known browser automation tools like Selenium and AutoIt that can achieve a lot in themselves. The prevailing use for browser automation is to imitate a real-world user and should only be used where necessary, … Continue reading Firefox Browser Automation with mozrepl – A PHP Class

Tip: Storing MD5 Values (and other string/binary representations)

A common occurrence I have noticed in MySQL apps is that MD5 values are stored as 32 byte values rather than 16. Just to ‘rehash’, an MD5 value is a 16 byte hexadecimal value, typically used as a unique fixed-length signature of a string, useful for identifying unique strings or one-way encryption of passwords. The … Continue reading Tip: Storing MD5 Values (and other string/binary representations)

A Quick and Efficient URL Shortener Using PHP and MySQL

URL shortener’s have proliferated in the past few years, mainly due to the confines of data length that mobile and social networks like Twitter apply. The following code example shows how to make a simple and efficient URL shortener, with plenty scope for improvement. Although in this example I am going to use localhost as … Continue reading A Quick and Efficient URL Shortener Using PHP and MySQL

Storing InnoDB Tables on Multiple Directories and Disks

InnoDB by default stores all data in one large file, typically referred to as the InnoDB tablespace. Without customisation, A file named ibdata1 at the root of your MySQL data directory will contain all your data and indexes. One problem that has been noted with this setup is that data cannot be reclaimed when you … Continue reading Storing InnoDB Tables on Multiple Directories and Disks