Browse Source

Trivial change to add access to CURL version information for

user programs in order to have them react appropriately.
PHP-4.0.5
Kristian Köhntopp 26 years ago
parent
commit
19687ea1ed
  1. 11
      ext/curl/curl.c
  2. 3
      ext/curl/php_curl.h

11
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
#endif

3
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 */
#endif /* _PHP_CURL_H */
Loading…
Cancel
Save