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_EXT_HTTP_H
19 #define PHP_EXT_HTTP_H
21 #define HTTP_PEXT_VERSION "0.8.0-dev"
23 /* make compile on Win32 */
26 # include <winsock2.h>
28 # include <curl/curl.h>
30 #include "ext/standard/md5.h"
31 #include "phpstr/phpstr.h"
33 extern zend_module_entry http_module_entry
;
34 #define phpext_http_ptr &http_module_entry
36 ZEND_BEGIN_MODULE_GLOBALS(http
)
38 struct _http_globals_etag
{
43 struct _http_globals_log
{
47 struct _http_globals_send
{
48 double throttle_delay
;
55 struct _http_globals_request
{
56 struct _http_globals_request_methods
{
62 struct _http_globals_request_curl
{
64 # if LIBCURL_VERSION_NUM < 0x070c00
65 char error
[CURL_ERROR_SIZE
+ 1];
68 #endif /* HTTP_HAVE_CURL */
71 ZEND_END_MODULE_GLOBALS(http
)
75 # define HTTP_G(v) TSRMG(http_globals_id, zend_http_globals *, v)
76 # define HTTP_GLOBALS ((zend_http_globals *) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(http_globals_id)])
78 # define HTTP_G(v) (http_globals.v)
79 # define HTTP_GLOBALS http_globals
81 #define getGlobals(G) zend_http_globals *G = HTTP_GLOBALS;
83 PHP_FUNCTION(http_test
);
84 PHP_FUNCTION(http_date
);
85 PHP_FUNCTION(http_absolute_uri
);
86 PHP_FUNCTION(http_negotiate_language
);
87 PHP_FUNCTION(http_negotiate_charset
);
88 PHP_FUNCTION(http_redirect
);
89 PHP_FUNCTION(http_throttle
);
90 PHP_FUNCTION(http_send_status
);
91 PHP_FUNCTION(http_send_last_modified
);
92 PHP_FUNCTION(http_send_content_type
);
93 PHP_FUNCTION(http_send_content_disposition
);
94 PHP_FUNCTION(http_match_modified
);
95 PHP_FUNCTION(http_match_etag
);
96 PHP_FUNCTION(http_cache_last_modified
);
97 PHP_FUNCTION(http_cache_etag
);
98 PHP_FUNCTION(http_send_data
);
99 PHP_FUNCTION(http_send_file
);
100 PHP_FUNCTION(http_send_stream
);
101 PHP_FUNCTION(http_chunked_decode
);
102 PHP_FUNCTION(http_split_response
);
103 PHP_FUNCTION(http_parse_headers
);
104 PHP_FUNCTION(http_get_request_headers
);
105 #ifdef HTTP_HAVE_CURL
106 PHP_FUNCTION(http_get
);
107 PHP_FUNCTION(http_head
);
108 PHP_FUNCTION(http_post_data
);
109 PHP_FUNCTION(http_post_fields
);
110 PHP_FUNCTION(http_put_file
);
111 PHP_FUNCTION(http_put_stream
);
112 /*PHP_FUNCTION(http_request)*/
113 PHP_FUNCTION(http_request_method_register
);
114 PHP_FUNCTION(http_request_method_unregister
);
115 PHP_FUNCTION(http_request_method_exists
);
116 PHP_FUNCTION(http_request_method_name
);
117 #endif /* HTTP_HAVE_CURL */
118 PHP_FUNCTION(http_auth_basic
);
119 PHP_FUNCTION(http_auth_basic_cb
);
120 #ifndef ZEND_ENGINE_2
121 PHP_FUNCTION(http_build_query
);
122 #endif /* ZEND_ENGINE_2 */
123 PHP_FUNCTION(ob_etaghandler
);
125 PHP_MINIT_FUNCTION(http
);
126 PHP_MSHUTDOWN_FUNCTION(http
);
127 PHP_RINIT_FUNCTION(http
);
128 PHP_RSHUTDOWN_FUNCTION(http
);
129 PHP_MINFO_FUNCTION(http
);
131 #endif /* PHP_HTTP_H */
138 * vim600: noet sw=4 ts=4 fdm=marker
139 * vim<600: noet sw=4 ts=4