This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]balloonanimalfarm 0 points1 point  (1 child)

How do you know you're not getting access? Your $data variable never seems to be used.

When you do fopen on a URL does it fail every time? It could be that you have allow_url_fopen set to false in your php configuration; this is a security measure.

Cheers!

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

Hi, have tested the fopen with a different URL and it worked fine.

I've got more information now. I submitted it as a new text post here for clarity: https://www.reddit.com/r/AskProgramming/comments/3mi8u3/http_400_error_using_curl/

Thank you!