2
+----------------------------------------------------------------------+
4
+----------------------------------------------------------------------+
5
| Copyright (c) 1997-2004 The PHP Group |
6
+----------------------------------------------------------------------+
7
| This source file is subject to version 3.0 of the PHP license, |
8
| that is bundled with this package in the file LICENSE, and is |
9
| available through the world-wide-web at the following url: |
10
| http://www.php.net/license/3_0.txt. |
11
| If you did not receive a copy of the PHP license and are unable to |
12
| obtain it through the world-wide-web, please send a note to |
13
| license@php.net so we can mail you a copy immediately. |
14
+----------------------------------------------------------------------+
15
| Author: Sterling Hughes <sterling@php.net> |
16
| Wez Furlong <wez@thebrainroom.com> |
17
+----------------------------------------------------------------------+
20
/* $Id: php_curl.h,v 1.41.2.1 2005/06/02 21:04:43 tony2001 Exp $ */
26
#include "ext/standard/php_smart_str.h"
28
#ifdef COMPILE_DL_CURL
35
#define PHP_CURL_DEBUG 0
37
#include <curl/curl.h>
38
#include <curl/multi.h>
40
extern zend_module_entry curl_module_entry;
41
#define curl_module_ptr &curl_module_entry
43
#define CURLOPT_RETURNTRANSFER 19913
44
#define CURLOPT_BINARYTRANSFER 19914
45
#define PHP_CURL_STDOUT 0
46
#define PHP_CURL_FILE 1
47
#define PHP_CURL_USER 2
48
#define PHP_CURL_DIRECT 3
49
#define PHP_CURL_RETURN 4
50
#define PHP_CURL_ASCII 5
51
#define PHP_CURL_BINARY 6
52
#define PHP_CURL_IGNORE 7
55
#define le_curl_name "cURL handle"
56
int le_curl_multi_handle;
57
#define le_curl_multi_handle_name "cURL Multi Handle"
59
PHP_MINIT_FUNCTION(curl);
60
PHP_MSHUTDOWN_FUNCTION(curl);
61
PHP_MINFO_FUNCTION(curl);
62
PHP_FUNCTION(curl_version);
63
PHP_FUNCTION(curl_init);
64
PHP_FUNCTION(curl_copy_handle);
65
PHP_FUNCTION(curl_setopt);
66
PHP_FUNCTION(curl_exec);
67
PHP_FUNCTION(curl_getinfo);
68
PHP_FUNCTION(curl_error);
69
PHP_FUNCTION(curl_errno);
70
PHP_FUNCTION(curl_close);
71
PHP_FUNCTION(curl_multi_init);
72
PHP_FUNCTION(curl_multi_add_handle);
73
PHP_FUNCTION(curl_multi_remove_handle);
74
PHP_FUNCTION(curl_multi_select);
75
PHP_FUNCTION(curl_multi_exec);
76
PHP_FUNCTION(curl_multi_getcontent);
77
PHP_FUNCTION(curl_multi_info_read);
78
PHP_FUNCTION(curl_multi_close);
79
void _php_curl_multi_close(zend_rsrc_list_entry * TSRMLS_DC);
83
zend_fcall_info_cache fci_cache;
92
zend_fcall_info_cache fci_cache;
99
php_curl_write *write;
100
php_curl_write *write_header;
105
struct _php_curl_error {
106
char str[CURL_ERROR_SIZE + 1];
110
struct _php_curl_free {
117
struct _php_curl_error err;
118
struct _php_curl_free to_free;
121
php_curl_handlers *handlers;
124
zend_bool in_callback;
133
void _php_curl_cleanup_handle(php_curl *);
135
/* streams support */
137
extern php_stream_ops php_curl_stream_ops;
138
#define PHP_STREAM_IS_CURL &php_curl_stream_ops
140
php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, char *mode,
141
int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
143
extern php_stream_wrapper php_curl_wrapper;
145
struct php_curl_buffer {
146
off_t readpos, writepos;
154
struct php_curl_buffer readbuffer; /* holds downloaded data */
155
struct php_curl_buffer writebuffer; /* holds data to upload */
157
fd_set readfds, writefds, excfds;
160
char errstr[CURL_ERROR_SIZE + 1];
168
#define curl_module_ptr NULL
169
#endif /* HAVE_CURL */
170
#define phpext_curl_ptr curl_module_ptr
171
#endif /* _PHP_CURL_H */