note 58074 modified in function.curl-setopt by danbrown

From: Date: Sun, 17 May 2009 17:31:09 +0000
Subject: note 58074 modified in function.curl-setopt by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154993@lists.php.net to get a copy of this message
Resetting CURLOPT_FILE to STDOUT won't work by calling curl_setopt() with the STDOUT constant or a php://output stream handle (at least I get error messages when trying the code from phpnet at andywaite dot com). Instead, one can simply reset it as a side effect of CURLOPT_RETURNTRANSFER. Just say <?php curl_setopt($this->curl,CURLOPT_RETURNTRANSFER,0); ?> and following calls to curl_exec() will output to STDOUT again. --was-- Resetting CURLOPT_FILE to STDOUT won't work by calling curl_setopt() with the STDOUT constant or a php://output stream handle (at least I get error messages when trying the code from phpnet at andywaite dot com). Instead, one can simply reset it as a side effect of CURLOPT_RETURNTRANSFER. Just say curl_setopt($this->curl,CURLOPT_RETURNTRANSFER,0); and following calls to curl_exec() will output to STDOUT again. http://php.net/manual/en/function.curl-setopt.php

« previous php.notes (#154993) next »