Make cURL output STDERR to file (or string)

You are making couple mistakes in your example: 1) you have to call curl_exec() prior to reading from the “verbose log”, because curl_setopt() doesn’t perform any action, so nothing can be logged prior to the curl_exec(). 2) you are opening $curl_log = fopen(“curl.txt”, ‘w’); only for write, so nothing could be read, even after you … Read more