Skip to content

Instantly share code, notes, and snippets.

@divinity76
Last active April 7, 2023 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divinity76/11c35e2c5c16d5166936f8561af6b788 to your computer and use it in GitHub Desktop.
Save divinity76/11c35e2c5c16d5166936f8561af6b788 to your computer and use it in GitHub Desktop.
curlopt verbose stackoverflow
add CURLOPT_VERBOSE and post the verbose log: ```$stderrh=tmpfile();
curl_setopt_array($ch,array(CURLOPT_VERBOSE=>1,CURLOPT_STDERR=>$stderrh));
curl_exec($ch);
/* https://bugs.php.net/bug.php?id=76268 */
rewind($stderrh);
$stderr=stream_get_contents($stderrh);
fclose($stderrh);
var_dump($stderr);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment