note 25846 deleted from function.curl-setopt by felipe
| From: | felipe@php.net | Date: | Sun, 30 Mar 2008 18:59:50 +0000 |
| Subject: | note 25846 deleted from function.curl-setopt by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137764@lists.php.net to get a copy of this message | ||
Note Submitter: m dot fische at gmx dot net
----
note: if your option comes from a variable eg:
$option = "CURLOPT_RETURNTRANSFER";
$value = "1";
this will fail:
curl_setopt($ch,$option,$value);
because the curl option is a constant.
use the function constant() to get the value:
curl_setopt($ch,constant($option),$value);