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.15.0"
23 /* make compile on Win32 */
26 # include <winsock2.h>
28 # include <curl/curl.h>
31 #include "phpstr/phpstr.h"
33 extern zend_module_entry http_module_entry
;
34 #define phpext_http_ptr &http_module_entry
36 extern int http_module_number
;
38 ZEND_BEGIN_MODULE_GLOBALS(http
)
41 zend_bool only_exceptions
;
43 struct _http_globals_etag
{
49 struct _http_globals_log
{
52 char *allowed_methods
;
56 struct _http_globals_send
{
57 double throttle_delay
;
64 struct _http_globals_request
{
65 struct _http_globals_request_methods
{
71 struct _http_globals_request_copies
{
77 # ifndef HAVE_CURL_EASY_STRERROR
78 char error
[CURL_ERROR_SIZE
+ 1];
80 #endif /* HTTP_HAVE_CURL */
83 ZEND_END_MODULE_GLOBALS(http
)
87 # define HTTP_G(v) TSRMG(http_globals_id, zend_http_globals *, v)
88 # define HTTP_GLOBALS ((zend_http_globals *) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(http_globals_id)])
90 # define HTTP_G(v) (http_globals.v)
91 # define HTTP_GLOBALS (&http_globals)
93 #define getGlobals(G) zend_http_globals *G = HTTP_GLOBALS;
95 PHP_FUNCTION(http_test
);
96 PHP_FUNCTION(http_date
);
97 PHP_FUNCTION(http_build_uri
);
98 PHP_FUNCTION(http_negotiate_language
);
99 PHP_FUNCTION(http_negotiate_charset
);
100 PHP_FUNCTION(http_redirect
);
101 PHP_FUNCTION(http_throttle
);
102 PHP_FUNCTION(http_send_status
);
103 PHP_FUNCTION(http_send_last_modified
);
104 PHP_FUNCTION(http_send_content_type
);
105 PHP_FUNCTION(http_send_content_disposition
);
106 PHP_FUNCTION(http_match_modified
);
107 PHP_FUNCTION(http_match_etag
);
108 PHP_FUNCTION(http_cache_last_modified
);
109 PHP_FUNCTION(http_cache_etag
);
110 PHP_FUNCTION(http_send_data
);
111 PHP_FUNCTION(http_send_file
);
112 PHP_FUNCTION(http_send_stream
);
113 PHP_FUNCTION(http_chunked_decode
);
114 PHP_FUNCTION(http_parse_message
);
115 PHP_FUNCTION(http_parse_headers
);
116 PHP_FUNCTION(http_get_request_headers
);
117 PHP_FUNCTION(http_get_request_body
);
118 PHP_FUNCTION(http_match_request_header
);
119 #ifdef HTTP_HAVE_CURL
120 PHP_FUNCTION(http_get
);
121 PHP_FUNCTION(http_head
);
122 PHP_FUNCTION(http_post_data
);
123 PHP_FUNCTION(http_post_fields
);
124 PHP_FUNCTION(http_put_file
);
125 PHP_FUNCTION(http_put_stream
);
126 #endif /* HTTP_HAVE_CURL */
127 PHP_FUNCTION(http_request_method_register
);
128 PHP_FUNCTION(http_request_method_unregister
);
129 PHP_FUNCTION(http_request_method_exists
);
130 PHP_FUNCTION(http_request_method_name
);
131 #ifndef ZEND_ENGINE_2
132 PHP_FUNCTION(http_build_query
);
133 #endif /* ZEND_ENGINE_2 */
134 PHP_FUNCTION(ob_etaghandler
);
136 PHP_MINIT_FUNCTION(http
);
137 PHP_MSHUTDOWN_FUNCTION(http
);
138 PHP_RINIT_FUNCTION(http
);
139 PHP_RSHUTDOWN_FUNCTION(http
);
140 PHP_MINFO_FUNCTION(http
);
142 #endif /* PHP_HTTP_H */
149 * vim600: noet sw=4 ts=4 fdm=marker
150 * vim<600: noet sw=4 ts=4