curl_setopt($ch, CURLOPT_FILE, null); or curl_setopt($ch, CURLOPT_FILE, false); gives Warning: curl_setopt(): supplied argument is not a valid File-Handle resource
There is nowhere said what to do to remove completely reference to file handle. Must I start a completely new curl handle to be clean with this option ?
Per http://php.net/manual/en/function.curl-setopt.php, you should change it to
STDOUT, which is the default. Or, if you’re not interested in the output at all, you could change it to/dev/null.