Reputation: 61
I am using this CURLOPT_RETURNTRANSFER => 1
in my code that's return a result if success.
My question is:
The curl_exec() will return a result if I get a response with status != 200 ? like 400 and a message ? or in this case just FALSE ?
Upvotes: 0
Views: 114
Reputation: 7100
Please read the manual carefuly. The answer is there. https://www.php.net/manual/en/function.curl-exec.php
Note that response status codes which indicate errors (such as 404 Not found) are not regarded as failure. curl_getinfo() can be used to check for these.
Upvotes: 1