Great post as always Lorna! That said, I *hate* cURL. :P I think it's a great way for people still running PHP pre-5 to get things done.

For 5 and on and for what you're using in this particular example, the HTTP streams wrapper. Check out Example #1 here: http://php.net/manual/en/context.http.php.

If you need all the functionality that cURL provides with a bit less code, pecl_http is great: http://pecl.php.net/package/pecl_http.