Thanks a lot. I've tried the code above and can now see the error message apache is giving. It is giving me an authorization required message. I have now cut&pasted the password in and am 100% sure all the credentials are correct. The webserver is apache 2, and I am using htdigest authentication. I could try switching to basic authentication if this might be helpful.. should make no difference security-wise since it is all SSL anyhow. Otherwise I have no clue... could special characters in the password give trouble? I have some in there, but i'd rather not post which ;-)... But I could try changing password to test this if it is at all plausible.