Kevin: that's a good addition, thanks for that :)

Robert: I'm very pleased to hear this was helpful. You can use curl from within PHP itself, I've been doing this recently and will write another post on that some time