use curl_setopt_array to set options