PHP 4.0 Bug #8318 Updated: Feature request for cURL
| From: | sniper@php.net | Date: | Wed, 03 Jan 2001 16:11:38 +0000 |
| Subject: | PHP 4.0 Bug #8318 Updated: Feature request for cURL | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42844@lists.php.net to get a copy of this message | ||
ID: 8318
Updated by: sniper
Reported By: paul@rydell.com
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To:
Comments:
There is already CURLOPT_RETURNTRANSFER option
which can be used to to this.
<?php
$ch = curl_init("http://www.somepage.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$myoutput=curl_exec($ch);
curl_close($ch);
?>
There was a bug with CURLOPT_RETURNTRANSFER but it's
now fixed in CVS.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-12-19 04:30:54] paul@rydell.com
I would like to use cURL to read the HTML (or whatever I am fetching) directly into a variable
instead of only into a file or STDOUT.
Something like:
$ch = curl_init("http://www.somepage.com/");
curl_setopt($ch,CURLOPT_VARIABLE,$myoutput);
curl_exec($ch);
print $myoutput;
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8318