PHP - cURL or something like it
Go to solution
Solved by Mr_KoKa,
// Include header in result? (0 = yes, 1 = no)
I think it is other way around 1 is enabled and 0 is disabled, other then that you're good. Do you have any particular problem with curl implementation?
My plain curl request looks like this:
GET / HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: curl/7.52.1
Accept: */*
And request made using your curl code results in such request:
GET / HTTP/1.1
User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16 20:23:10
Host: 127.0.0.1:8000
Accept: */*
So the User-Agent header is set.
So what is not working for you? if there is no output and you know thet crul_exec return is === FALSE then you can try to curl_error on curl handle $ch to know what is wrong.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now