note 66473 modified in function.curl-setopt-array by darkelder
| From: | darkelder@php.net | Date: | Tue, 23 May 2006 18:47:55 +0000 |
| Subject: | note 66473 modified in function.curl-setopt-array by darkelder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-111895@lists.php.net to get a copy of this message | ||
Prior to PHP 5.1.4 you can simulate this function with:
<?php
if (!function_exists('curl_setopt_array')) {
function curl_setopt_array(&$ch, $curl_options)
{
foreach ($curl_options as $option => $value) {
if (!curl_setopt($ch, $option, $value)) {
return false;
}
}
return true;
}
}
?>
--was--
To PHP 5.1.2 and above you can simulte this function with:
<?php
if (!function_exists('curl_setopt_array')) {
function curl_setopt_array(&$ch, $curl_options)
{
foreach ($curl_options as $option => $value) {
if (!curl_setopt($ch, $option, $value)) {
return false;
}
}
return true;
}
}
?>
http://php.net/manual/en/function.curl-setopt-array.php