]> granicus.if.org Git - php/commitdiff
Trivial change to add access to CURL version information for
authorKristian Köhntopp <kk@php.net>
Tue, 25 Jul 2000 22:15:26 +0000 (22:15 +0000)
committerKristian Köhntopp <kk@php.net>
Tue, 25 Jul 2000 22:15:26 +0000 (22:15 +0000)
user programs in order to have them react appropriately.

ext/curl/curl.c
ext/curl/php_curl.h

index a29a9f07fc7e360485aa47a8cb6d45f54b837071..4c8af7a4815ad80e5bcb392c4dad15e35c61f449 100644 (file)
@@ -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
index b5c6e51dd47de7f43b6b6bafcc269f96d76e4a57..0f82b27bc58ff9f411a16753eff871ff816b45e2 100644 (file)
@@ -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 */