CURL_OPTION in foreach statement
| From: | Jose Lopez | Date: | Wed, 29 Mar 2006 17:59:23 +0000 |
| Subject: | CURL_OPTION in foreach statement | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232860@lists.php.net to get a copy of this message | ||
It seems something is not working so well here:
$extra_curl_params = array ('CURLOPT_POST'=>TRUE);
foreach ($extra_curl_params as $curl_opt_name=>$curl_opt_value) {
curl_setopt ($curl_handle, $curl_opt_name, $curl_opt_value);
}
I use this "foreach" method to set up curl options and actually curl_setopt function does not complaint about it. But some or all of the options set seems not to be properly working when curl actually make the connection.
Anyone could help?