Answer the question
In order to leave comments, you need to log in
CURL Why is the server returning an incomplete response?
Good afternoon!
The problem is this:
When requesting JSON from a third-party server, the response comes in an incomplete form, and each time in a different way.
The request looks like this:
$ch = curl_init('http://blabla.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 0);
$result = curl_exec($ch);
curl_close($ch);
$obj = json_decode($result, true);
var_dump($obj);
Answer the question
In order to leave comments, you need to log in
max_input_time look at the server in php.ini, it helped me, and other maximum input values
you need to look not at what is in obj, but what is in result...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question