summaryrefslogtreecommitdiff
path: root/ext/curl/php_curl.h
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2000-09-30 03:09:54 +0000
committerSterling Hughes <sterling@php.net>2000-09-30 03:09:54 +0000
commit36dc3e1c2055617ab0e8be6d83ec4c645edf1a0a (patch)
treea0af6e0fb3ff7b39e2cc14b30f311d833ba9d9a9 /ext/curl/php_curl.h
parent974a0ddf6542bb1b40a66df2ad4cfb6207266e2f (diff)
downloadphp-git-36dc3e1c2055617ab0e8be6d83ec4c645edf1a0a.tar.gz
@ Added the ability for CURLOPT_POSTFIELDS to accept an array of HTTP post
parameters. (Sterling) @ Added the CURLOPT_HTTPHEADER option that allows for the posting of HTTP headers to a remote site from cURL. (Sterling) @ Add the curl_error() and curl_errno() functions. (Sterling) Buncha other changes... - Changed if () else if () in curl_setopt to switch .. case - Fixed a couple crashes in certain cases. - Finally a decent error reporting scheme. - A few formatting changes.
Diffstat (limited to 'ext/curl/php_curl.h')
-rw-r--r--ext/curl/php_curl.h54
1 files changed, 6 insertions, 48 deletions
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index d3abd8832c..19400e4b68 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -33,6 +33,8 @@
extern zend_module_entry curl_module_entry;
#define curl_module_ptr &curl_module_entry
+#define CURLOPT_RETURNTRANSFER 19913
+
PHP_MINIT_FUNCTION(curl);
PHP_MSHUTDOWN_FUNCTION(curl);
PHP_MINFO_FUNCTION(curl);
@@ -40,60 +42,16 @@ PHP_FUNCTION(curl_version);
PHP_FUNCTION(curl_init);
PHP_FUNCTION(curl_setopt);
PHP_FUNCTION(curl_exec);
+PHP_FUNCTION(curl_error);
+PHP_FUNCTION(curl_errno);
PHP_FUNCTION(curl_close);
-#define CE_OK 0
-#define CE_UNSUPPORTED_PROTOCOL 1
-#define CE_FAILED_INIT 2
-#define CE_URL_MALFORMAT 3
-#define CE_URL_MALFORMAT_USER 4
-#define CE_COULDNT_RESOLVE_PROXY 5
-#define CE_COULDNT_RESOLVE_HOST 6
-#define CE_COULDNT_CONNECT 7
-#define CE_FTP_WEIRD_SERVER_REPLY 8
-#define CE_FTP_ACCESS_DENIED 9
-#define CE_FTP_USER_PASSWORD_INCORRECT 10
-#define CE_FTP_WEIRD_PASS_REPLY 11
-#define CE_FTP_WEIRD_USER_REPLY 12
-#define CE_FTP_WEIRD_PASV_REPLY 13
-#define CE_FTP_WEIRD_227_FORMAT 14
-#define CE_FTP_CANT_GET_HOST 15
-#define CE_FTP_CANT_RECONNECT 16
-#define CE_FTP_COULDNT_SET_BINARY 17
-#define CE_PARTIAL_FILE 18
-#define CE_FTP_COULDNT_RETR_FILE 19
-#define CE_FTP_WRITE_ERROR 20
-#define CE_FTP_QUOTE_ERROR 21
-#define CE_HTTP_NOT_FOUND 22
-#define CE_WRITE_ERROR 23
-#define CE_MALFORMAT_USER 24
-#define CE_FTP_COULDNT_STOR_FILE 25
-#define CE_READ_ERROR 26
-#define CE_OUT_OF_MEMORY 27
-#define CE_OPERATION_TIMEOUTED 28
-#define CE_FTP_COULDNT_SET_ASCII 29
-#define CE_FTP_PORT_FAILED 30
-#define CE_FTP_COULDNT_USE_REST 31
-#define CE_FTP_COULDNT_GET_SIZE 32
-#define CE_HTTP_RANGE_ERROR 33
-#define CE_HTTP_POST_ERROR 34
-#define CE_SSL_CONNECT_ERROR 35
-#define CE_FTP_BAD_DOWNLOAD_RESUME 36
-#define CE_FILE_COULDNT_READ_FILE 37
-#define CE_LDAP_CANNOT_BIND 38
-#define CE_LDAP_SEARCH_FAILED 39
-#define CE_LIBRARY_NOT_FOUND 40
-#define CE_FUNCTION_NOT_FOUND 41
-#define CE_ABORTED_BY_CALLBACK 42
-#define CE_BAD_FUNCTION_ARGUMENT 43
-#define CE_BAD_CALLING_ORDER 44
-#define C_LAST 45
-#define CURLOPT_RETURNTRANSFER 500
-
typedef struct {
int return_transfer;
int output_file;
int php_stdout;
+ int cerrno;
+ char error[CURL_ERROR_SIZE+1];
CURL *cp;
} php_curl;