cvs: php4 /ext/curl curl.c php_curl.h
| From: | Kristian K�hntopp | Date: | Tue, 25 Jul 2000 22:15:26 +0000 |
| Subject: | cvs: php4 /ext/curl curl.c php_curl.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-921@lists.php.net to get a copy of this message | ||
kk Tue Jul 25 15:15:26 2000 EDT
Modified files:
/php4/ext/curl curl.c php_curl.h
Log:
Trivial change to add access to CURL version information for
user programs in order to have them react appropriately.
Index: php4/ext/curl/curl.c
diff -u php4/ext/curl/curl.c:1.2 php4/ext/curl/curl.c:1.3
--- php4/ext/curl/curl.c:1.2 Mon Jul 24 12:59:59 2000
+++ php4/ext/curl/curl.c Tue Jul 25 15:15:26 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: curl.c,v 1.2 2000/07/24 19:59:59 sterling Exp $ */
+/* $Id: curl.c,v 1.3 2000/07/25 22:15:26 kk Exp $ */
#include "php.h"
@@ -37,6 +37,7 @@
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 @@
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 @@
}
/* }}} */
-#endif
\ No newline at end of file
+#endif
Index: php4/ext/curl/php_curl.h
diff -u php4/ext/curl/php_curl.h:1.2 php4/ext/curl/php_curl.h:1.3
--- php4/ext/curl/php_curl.h:1.2 Mon Jul 24 13:00:00 2000
+++ php4/ext/curl/php_curl.h Tue Jul 25 15:15:26 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_curl.h,v 1.2 2000/07/24 20:00:00 sterling Exp $ */
+/* $Id: php_curl.h,v 1.3 2000/07/25 22:15:26 kk Exp $ */
#ifndef _PHP_CURL_H
#define _PHP_CURL_H
@@ -33,6 +33,7 @@
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 @@
#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 */