Its pretty easy to do in Curl. I'm thinking with fsockopen() you'd have to form the URL with the username and password in the URL. I don't remember the format off the top of my head. Its something like [url]http://[/url][username]:[password]@[url] or something like that.