2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.0 of the PHP license, that |
6 | is bundled with this package in the file LICENSE, and is available |
7 | through the world-wide-web at http://www.php.net/license/3_0.txt. |
8 | If you did not receive a copy of the PHP license and are unable to |
9 | obtain it through the world-wide-web, please send a note to |
10 | license@php.net so we can mail you a copy immediately. |
11 +----------------------------------------------------------------------+
12 | Copyright (c) 2004-2005 Michael Wallner <mike@php.net> |
13 +----------------------------------------------------------------------+
18 #ifndef PHP_HTTP_CURL_API_H
19 #define PHP_HTTP_CURL_API_H
21 #include "php_http_std_defs.h"
24 # include <winsock2.h>
27 #include <curl/curl.h>
29 #define http_get(u, o, i, d, l) _http_get_ex(NULL, (u), (o), (i), (d), (l) TSRMLS_CC)
30 #define http_get_ex(c, u, o, i, d, l) _http_get_ex((c), (u), (o), (i), (d), (l) TSRMLS_CC)
31 PHP_HTTP_API STATUS
_http_get_ex(CURL
*ch
, const char *URL
, HashTable
*options
, HashTable
*info
, char **data
, size_t *data_len TSRMLS_DC
);
33 #define http_head(u, o, i, d, l) _http_head_ex(NULL, (u), (o), (i), (d), (l) TSRMLS_CC)
34 #define http_head_ex(c, u, o, i, d, l) _http_head_ex((c), (u), (o), (i), (d), (l) TSRMLS_CC)
35 PHP_HTTP_API STATUS
_http_head_ex(CURL
*ch
, const char *URL
, HashTable
*options
, HashTable
*info
, char **data
, size_t *data_len TSRMLS_DC
);
37 #define http_post_data(u, pd, pl, o, i, d, l) _http_post_data_ex(NULL, (u), (pd), (pl), (o), (i), (d), (l) TSRMLS_CC)
38 #define http_post_data_ex(c, u, pd, pl, o, i, d, l) _http_post_data_ex((c), (u), (pd), (pl), (o), (i), (d), (l) TSRMLS_CC)
39 PHP_HTTP_API STATUS
_http_post_data_ex(CURL
*ch
, const char *URL
, char *postdata
, size_t postdata_len
, HashTable
*options
, HashTable
*info
, char **data
, size_t *data_len TSRMLS_DC
);
41 #define http_post_array(u, p, o, i, d, l) _http_post_array_ex(NULL, (u), (p), (o), (i), (d), (l) TSRMLS_CC)
42 #define http_post_array_ex(c, u, p, o, i, d, l) _http_post_array_ex((c), (u), (p), (o), (i), (d), (l) TSRMLS_CC)
43 PHP_HTTP_API STATUS
_http_post_array_ex(CURL
*ch
, const char *URL
, HashTable
*postarray
, HashTable
*options
, HashTable
*info
, char **data
, size_t *data_len TSRMLS_DC
);
45 #define http_post_curldata(u, h, o, i, d, l) _http_post_curldata_ex(NULL, (u), (h), (o), (i), (d), (l) TSRMLS_CC)
46 #define http_post_curldata_ex(c, u, h, o, i, d, l) _http_post_curldata_ex((c), (u), (h), (o), (i), (d), (l) TSRMLS_CC)
47 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
);
56 * vim600: noet sw=4 ts=4 fdm=marker
57 * vim<600: noet sw=4 ts=4