PHP curl not returning data in all cases
For some reason the FETCH data is returned as header data, which by default pipes to stderr. You can capture it via the CURLOPT_HEADERFUNCTION callback. For example, to store it to a file, something like this:
$fileHandle = tmpfile(); curl_setopt($this->ch, CURLOPT_HEADERFUNCTION, function ($ch, $str) use ($fileHandle) { fwrite($fileHandle, $str); return strlen($str); } );