Re: Redirecting cURL output to a variable?
| From: | Sterling Hughes | Date: | Mon, 21 Aug 2000 14:51:35 +0000 |
| Subject: | Re: Redirecting cURL output to a variable? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-30063@lists.php.net to get a copy of this message | ||
Yup, set the CURLOPT_RETURNTRANSFER to 1:
<?php
$ch = curl_init ("http://www.php.net/");
// Set this to one to have curl_exec() return
// the results of the transfer. You can not use
// CURLOPT_FILE if you have CURLOPT_RETURNTRANSFER
// set.
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec ($ch);
curl_close ($ch);
$output = strtolower ($output);
echo $output;
?>
-Sterling
>Hi,
>
>Can the cURL output directly written to a PHP varible?
>
>thanx tom
>
>--
>Tom Anheyer
>G+J BerlinOnline GmbH Tel. : +49-(0)30-2327-5210
>im Pressehaus am Alexanderplatz Fax: +49-(0)30-2327-5596
>Karl-Liebknecht-Straße 29 E-Mail: >Tom.Anheyer@BerlinOnline.de
>D-10178 Berlin URL:
>http://www.BerlinOnline.de
>
>BerlinOnline ist ein Service von Berliner Zeitung, TIP BerlinMagazin,
>Berliner Kurier und Berliner Abendblatt.
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>For additional commands, e-mail: php-dev-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>