+/* {{{ STATUS http_post_curldata_ex(CURL *, char *, curl_httppost *, HashTable *, HashTable *, char **, size_t *) */
+PHP_HTTP_API STATUS _http_post_curldata_ex(CURL *ch, const char *URL,
+ struct curl_httppost *curldata, HashTable *options, HashTable *info,
+ char **data, size_t *data_len TSRMLS_DC)
+{
+ http_curl_initbuf(CURLBUF_EVRY);
+ http_curl_setopts(ch, URL, options);
+ curl_easy_setopt(ch, CURLOPT_POST, 1);
+ curl_easy_setopt(ch, CURLOPT_HTTPPOST, curldata);
+
+ if (CURLE_OK != curl_easy_perform(ch)) {
+ http_curl_freebuf(CURLBUF_EVRY);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not perform request");
+ return FAILURE;
+ }
+ if (info) {
+ http_curl_getinfo(ch, info);
+ }
+ http_curl_movebuf(CURLBUF_EVRY, data, data_len);
+ return SUCCESS;}
+/* }}} */
+