#24748 [Opn->Bgs]: URL in curl_ini() echos out data
| From: | nopass@php.net | Date: | Tue, 22 Jul 2003 06:54:06 +0000 |
| Subject: | #24748 [Opn->Bgs]: URL in curl_ini() echos out data | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-44474@lists.php.net to get a copy of this message | ||
ID: 24748
User updated by: nopass@php.net
Reported By: nopass@php.net
-Status: Open
+Status: Bogus
Bug Type: cURL related
Operating System: Linux, RH8.0
PHP Version: 4.3.3RC1
New Comment:
Oops, bug in my code. Sorry.
Previous Comments:
------------------------------------------------------------------------
[2003-07-22 01:43:28] nopass@php.net
Description:
------------
$ch = curl_ini("http://www.php.net/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($ch);
Will echo the page out to the browser even though you specified not to
do so with the non-zero RETURNTRANSFER value.
If you instead do:
$ch = curl_ini();
curl_setopt($ch, CURLOPT_URL, "http://www.php.net/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($ch);
The problem goes away.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24748&edit=1