Adam Williams – PHP Web Developer Leeds, UK Blog

I’ve had this WordPress site for ages and it has served me well, however I’d like to use the domain for something more server related, rather being a portfolio site. The plan therefore is to move the web geekery over to my new domain gky.me.uk. So if you’re looking for something that used to be [...]

Continue Reading -»

Here’s a quick bit of code I put together to read a UK postcode and spit out the various sections; the city identifier, the area and then the final street identifier: $pcarr = explode(‘ ‘, $this->input->post(‘companyPostcode’)); $pc0 = $pcarr[0]; if(is_numeric(substr($pc0, 1,1))){ $pca = substr($pc0, 0,1); } else { $pca = substr($pc0, 0,2); } // $pca [...]

Continue Reading -»

If you are receiving the Fatal error: Call to undefined function: json_encode() error hopefully this article will help. The reason for the error is because PHP cannot fine the function. The JSON functions are not built in to PHP (< 5.2) and is only available within the PECL libraries.  Ok, so that’s a whole lot of acronyms [...]

Continue Reading -»

I recently had a problem mounting a USB NTFS drive on a fresh CentOS 5 installation where it said unknown type ntfs when I tried using the mount command. Here’s how I solved the issue: Open up a prompt/SSH and login as root Download the RPM release for your version of CentOS (i386/X86_64) using wget [...]

Continue Reading -»

I’ve recently tried install both the 32 bit and 64 bit versions of CentOS 5.6 on VirtualBox. After enabling the ‘Enable IO APIC’ in the system settings of VirtualBox I was able to get the install at least as far as the splash screen appearing and it saying that it was preparing to install, then [...]

Continue Reading -»

CodeIgniter in its infinite wisdom decided to destroy the $_GET variable data and overwrite it with the URI segments. That’s all well and good for a website which uses 100% CodeIgniter and doesn’t interact with external websites / payment gateways / API’s etc. If you are in the majority and DO need to be able [...]

Continue Reading -»

Launched Leeds Indie Radio

New online independent music radio station launched

Continue Reading -»

Hi Internet peeps, I currently have 7 Spotify invites to give away, so if you would like one please leave your details and I will get the invite emailed to you. Seriously, if anyone reading this doesn’t have Spotify, you’re missing out big time, so bag yourself an invite while I have some left!

Continue Reading -»

Here’s some code which allows you to calculate the distance in miles, kilometres or nautical miles between two sets of coordinates: [code lang="js"]/* Function Name: distance() Function Description: Calculates the distance between two sets of coordinates. @Author: Adam Williams <adam.williams@awdigital.eu> @License: Creative Commons Attribution-Share Alike 2.0 UK: England & Wales - http://creativecommons.org/licenses/by-sa/2.0/uk/ @Example: distance(53.61857936489517, -1.4501953125, [...]

Continue Reading -»

If you’ve installed Windows on your Mac using Bootcamp and are desperately looking for the hash symbol (#) you will eventually discover that it is not on your keyboard and the Mac short cut of Alt + 3 doesn’t work. However, if you try Ctrl + Alt + 3 it should work just fine . [...]

Continue Reading -»