Skip to content


Taking Ajax further with PHP

Peter's WebDev Workshop

Find this tutorial useful?

First of all, I have to apologise. It’s been literally two months since my last post in this series, and it’s been more than that since I last looked at Ajax in PHP. OK, I might admit it, it was this comment that motivated me to pick up this series again. Oh, that and I’m now on the half term break, so I’m finally getting round to some things that have been on the back burner for a long time.

In our last Ajax tutorial, we got started with Ajax using PHP and made our first Ajax application.

Today, we’re going to take Ajax a little further, by building a little application where our user selects a product from a pop-up list, and then we do a little Ajax dance to get some product details (and an image) and display them in a box below. We’ll be making our own little XML schema which we’ll use to pass information between the JavaScript in the user’s browser and our PHP script on the server.

» Read the rest of this post…

This is why I love blogging

I just got a comment from someone called Jack (Dunford), on my last post. That’s not remarkable in itself – I get comments from people I don’t know fairly frequently.

Checking his blog, it looks like he also attended the West Quay Apple Store opening.

That’s a pretty unlikely coincidence, if you ask me. What’s even weirder though, is that he happened to take a photo of the queue, and I happened to be in that photo! Considering there were hundreds of people at the store opening, the likelihood of someone happening to have taken a picture with me in it is really really low.

That is one seriously weird coincidence. Weird, but cool.

Here’s the full photo, and I’ve cropped it a bit and pointed me out below.

Me at West Quay

There’s also a set of lots more photos from the opening here.

Really really strange coincidence.

Oh, and in response to the comment, the OLPC would be too low powered for my needs. Not quite a MacBook with my spec. 🙂 I want to see what they’re going to do with the interface though.


My MacBook apparently got dispatched today, one day ahead of the estimated time (yay!) and the shipping estimate is now the 23rd February.

With any luck, though, the shipping will be quicker than expected too, but I won’t get my hopes up.

In any case, my MacBook is now configured and on the way (expect a rush of posts once it’s here). 😀

When will they learn?

On BoingBoing:

Arnezami, a hacker on the Doom9 forum, has published a crack for extracting the “processing key” from a high-def DVD player. This key can be used to gain access to every single Blu-Ray and HD-DVD disc.

When will the recording/movie industries learn? Attempting to lock down consumers with ever more restrictive DRM is not going to work. Soon, we’ll get to a point where it’s easier to illegally acquire content than it is to purchase it, then jump through all the hoops to get it working legitimately (in fact, you could argue that we’ve already got there, with the whole ‘HD ready’ fiasco).

Sure, there are still practical issues with distributing 20 odd gigabytes of high definition movie, but it looks like AACS really was as completely rubbish as I thought it would be.

Clearly, DRM is flawed. The whole concept is. Good security algorithms are built on good mathematical foundations, then tested for years before they’re declared as secure. AACS simply didn’t have enough time to stand the test of time and get the heck pounded out of it, before it started being used.

DRM’s downfall is pretty much inevitable now, in my opinion. With Steve Jobs openly wanting it dead, it’s just a matter of when. And then everything will be great again. Oh, hang on, then there’s still Microsoft. Damn.

UPDATE: oooh, will this mean they’ll start revoking high-def players? Brilliant. Working one day, dead the next.

I bought a Mac

  • MacBook 13″ white
  • Intel Core 2 Duo 2.0 GHz
  • 2 GB RAM 😛
  • 120 GB HDD
  • And all of the other specs of the MacBook

It will take 3 business days to configure (that RAM upgrade and the HDD upgrade), then 3-7 days to ship.

And I can’t wait.

Just to clarify – this will not mean that I will stop using Linux (I certainly now don’t have the money to buy a new desktop anyway 😀 ). It’s not a ‘switch’ either, it’s expanding my horizons, being proficient in all three operating systems (not only does that look impressive on a CV, it’s fun too) and playing around with new stuff.

Expect a massive load of Mac-related blog posts coming as soon as it arrives (unboxing photos included hopefully) and then the platform balance will probably return to about 45%:45%:15% (Mac:Linux:Windows). Or something like that. 🙂

And I’ll try and get that Safari bug to reproduce. Plus there shouldn’t be future Safari bugs, as I’ll actually be able to test in it!

I can’t wait also to have a play around in Xcode and compare it to MS Visual Studio (the latter being a very good product, so I hope Xcode is mind-blowingly good 😀 ). In fact, I better shut up right now or I’ll be here all night explaining what I’m going to be doing. And annoy everyone.

West Quay Apple store

Just got back from Southampton (~30 miles away from where I live). The new Apple Store in the West Quay shopping centre opened today, and I managed to get my hands on an exclusive t-shirt for apparently being one of the first 1,000 people to go in!

I managed to leave without buying anything, this time. It was pretty cool to go there and be there for the opening, but it was really packed and I was queueing for over an hour to even get inside in the first place!

While there, I also discovered a rendering bug with this site under Safari (which doesn’t show up in Konqueror), so I’ll have to take a look at that and hopefully get it fixed!

UPDATE: I can’t seem to see the same issue using BrowsrCamp to get screenshots, so I have no idea what caused the bug. In case it shows up again, the sidebar on the left seemed to have the text appear twice – once on top of the existing text, so you couldn’t read it. Anyone else see this/not see this with Safari?

UPDATE #2: This bug is really nasty. I’ve been unable to get it to consistently happen, so I’m afraid I’m unable to fix it. If anyone else comes on this site on Safari and sees this bug, please screenshot it, tell me as much as you can what you were doing when it happened and send me the information. Thanks.

It was snowing

I took these and uploaded them to Zooomr this morning, but I didn’t get round to blogging it! The cause? A combination of still having to go to college, having a powercut which brought down the internet which then refused to come back up even after the power came back on, and then wondering why the LAN wouldn’t work because of an unplugged cable (wired LANs rule and suck at the same time). Don’t even ask.

» Read the rest of this post…

Why Firefox isn’t more than 11% yet

Firefox logo

Firefox has taken off on home computers as the second most popular browser, and it’s looking very promising for open source, Mozilla and, more widely, non-MS software.

In fact, it supposedly has around an 11% global market share now, which is great news.

The next thing that needs to be tackled, however, is getting Firefox into the enterprise sector, and getting more and more businesses to roll it out. And before that can happen, Firefox needs:

  • An MSI installer for Windows, to make it easy for Windows administrators to roll it out across all desktops instead of running exes manually on each workstation.
  • Integration with Microsoft Active Directory, and respect for AD policies, like IE has now. It’s far too much to configure hundreds of installations of Firefox manually. Many corporate environments utilise proxy servers and other network setups, and there needs to be a way to get this configured centrally via AD or similar and rolled out to all FF installations.

If this happens, sysadmins are much more likely to choose Firefox for security reasons, and if it becomes as easy to manage remotely as IE is now, Firefox 3.0 will hopefully be a winner.

I’m not saying the personal sector isn’t important though – we still need to keep pushing Firefox to the average PC user and marketing it.

The success of Firefox could also prove vital for FOSS becoming mainstream in the future. If people use Firefox and have a good experience with it, they then associate open source with good user experience and being a good product. If that happens, we’re much more likely to see FOSS becoming more mainstream, which is good. Best of all, it keeps the traditional software companies on their toes and making good, well-priced products. 🙂

More adventures from Windows 95 VM land

I got IE3 under Windows 95 to display my site. But I didn’t stop there.

After a quick trip around the web to find a copy of IE 5.5 SP2 (the last IE for Windows 95), I manage to grab it and get it installed on Windows 95. Not only does this modernise the browser a touch, but it also installs various DLLs we’ll need to run a much better browser. 🙂

Thumbnails are clickable to enlarge, by the way.

IE 5.5 with 16 colours

Now we have IE 5.5, albeit at a rather bad 16 colours (not 16-bit colour, 16 different colours).

After an install of VMware Tools, we have the drivers to ramp up the colour depth to a respectable 65,536 different colours (that’s 16-bit colour).

IE 5.5 with 16-bit colour

A quick run of Windows Update to apply some security updates from, hmmm, looks like 1999. 😀

Windows Update

And finally, we install Firefox (it crashes on first run, but a reboot and relaunch and it works perfectly). Finally, a decent browser.

Firefox on Windows 95

Unfortunately, Firefox 2.0.x apparently doesn’t want to work with Windows 95 anymore.

Great fun – and I couldn’t have done it without this guide.

No, this site does not work in IE3

Oh the joys of VMware and a copy of Windows 95. The picture says it all.

No IE3 on my site, please!