From 19687ea1ed0fd31168c7097ea9b1a69b095ccc27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20K=C3=B6hntopp?= Date: Tue, 25 Jul 2000 22:15:26 +0000 Subject: [PATCH] Trivial change to add access to CURL version information for user programs in order to have them react appropriately. --- ext/curl/curl.c | 11 ++++++++++- ext/curl/php_curl.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ext/curl/curl.c b/ext/curl/curl.c index a29a9f07fc..4c8af7a481 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -37,6 +37,7 @@ php_curl_globals curl_globals; function_entry curl_functions[] = { PHP_FE (curl_init, NULL) + PHP_FE (curl_version, NULL) PHP_FE (curl_setopt, NULL) PHP_FE (curl_exec, NULL) PHP_FE (curl_close, NULL) @@ -122,6 +123,14 @@ PHP_MINIT_FUNCTION(curl) return SUCCESS; } +/* {{{ proto string curl_version () + Return the CURL version string. */ +PHP_FUNCTION (curl_version) +{ + RETURN_STRING(curl_version(),1); +} +/* }}} */ + /* {{{ proto int curl_init ([string url]) Initialize a CURL session */ PHP_FUNCTION (curl_init) @@ -260,4 +269,4 @@ PHP_FUNCTION (curl_close) } /* }}} */ -#endif \ No newline at end of file +#endif diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index b5c6e51dd4..0f82b27bc5 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -33,6 +33,7 @@ extern zend_module_entry curl_module_entry; PHP_MINIT_FUNCTION (curl); PHP_MINFO_FUNCTION (curl); +PHP_FUNCTION (curl_version); PHP_FUNCTION (curl_init); PHP_FUNCTION (curl_setopt); PHP_FUNCTION (curl_exec); @@ -56,4 +57,4 @@ typedef struct { #define curl_module_ptr NULL #endif /* HAVE_CURL */ #define phpext_curl_ptr curl_module_ptr -#endif /* _PHP_CURL_H */ \ No newline at end of file +#endif /* _PHP_CURL_H */ -- 2.40.0