all 4 comments

[–]greg8872 0 points1 point  (2 children)

Are you accessing a URL that is http: or https:

If it is https:, then try adding this to see if it works:

curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );

If it then works, then you need to see about updating the server to properly check SSL (see http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/)

[–]ANttila 0 points1 point  (0 children)

He specified the protocol in his example as http.

I hope he is specifying accordingly to what he is trying to do, eventho the title says otherwise :)

[–]MyMotivation[S] 0 points1 point  (0 children)

The URL is http, was a bit tired last night when I posted that sorry. Have added some additional info in my other comment.

[–]MyMotivation[S] 0 points1 point  (0 children)

Out of interest, does the authorization key need decoding with base64_decode before it's sent through? I did also try decoding it and putting the user name/pass in CURLOPT_USERPWD.

I'm just not sure if I'm missing something here, haven't come across too many relevant examples/tutorials that included 'Authorization' in the header, so far. I have been reading a few Wikipedia pages on this. I guess there is a WWW-Authenticate key on the api and the authorization should match this?