note 99082 added to function.curl-setopt
| From: | joeterranova at gmail dot com | Date: | Mon, 26 Jul 2010 19:57:50 +0000 |
| Subject: | note 99082 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171146@lists.php.net to get a copy of this message | ||
It appears that setting CURLOPT_FILE before setting CURLOPT_RETURNTRANSFER doesn't work,
presumably because CURLOPT_FILE depends on CURLOPT_RETURNTRANSFER being set.
So do this:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
not this:
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
----
Server IP: 69.147.83.197
Probable Submitter: 75.99.182.234
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- https://master.php.net/note/edit/99082
Del: integrated -- https://master.php.net/note/delete/99082/integrated
Del: useless -- https://master.php.net/note/delete/99082/useless
Del: bad code -- https://master.php.net/note/delete/99082/bad+code
Del: spam -- https://master.php.net/note/delete/99082/spam
Del: non-english -- https://master.php.net/note/delete/99082/non-english
Del: in docs -- https://master.php.net/note/delete/99082/in+docs
Del: other reasons-- https://master.php.net/note/delete/99082
Reject -- https://master.php.net/note/reject/99082
Search -- https://master.php.net/manage/user-notes.php