note 33665 deleted from ref.curl by danbrown

From: Date: Sun, 17 May 2009 19:44:53 +0000
Subject: note 33665 deleted from ref.curl by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155262@lists.php.net to get a copy of this message
Note Submitter: php at mechintosh dot com ---- IMHO the example code is somewhat confusing; the fopen() and fclose() are not needed at all, AFAICT. By default the resulting data/page of the external server is just printed out. To assign the result of the curl session to a variable, one can use - output buffering (see ob_start(), ob_get_contents()) - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); With the latter, the result of curl_exec is the actual data instead of a boolean.

« previous php.notes (#155262) next »