#include "php_http_std_defs.h"
#include "php_http_api.h"
#include "php_http_send_api.h"
-#include "php_http_request_api.h"
+#ifdef HTTP_HAVE_CURL
+# include "php_http_request_api.h"
+#endif
#ifdef ZEND_ENGINE_2
# include "php_http_util_object.h"
}
php_info_print_table_end();
+#ifdef HTTP_HAVE_CURL
php_info_print_table_start();
{
unsigned i;
phpstr_free(custom_request_methods);
}
php_info_print_table_end();
+#endif
php_info_print_table_start();
{
#endif
#include "php.h"
+#ifdef HTTP_HAVE_CURL
+
#include "php_http.h"
#include "php_http_std_defs.h"
#include "php_http_api.h"
}
/* }}} */
+#endif
+
/*
* Local variables:
* tab-width: 4
#ifndef PHP_HTTP_REQUEST_API_H
#define PHP_HTTP_REQUEST_API_H
+#ifdef HTTP_HAVE_CURL
#include "php_http_std_defs.h"
#include "phpstr/phpstr.h"
#define http_put(u, b, o, i, r) _http_request_ex(NULL, HTTP_PUT, (u), (b), (o), (i), (r) TSRMLS_CC)
#define http_put_ex(c, u, b, o, i, r) _http_request_ex((c), HTTP_PUT, (u), (b), (o), (i), (r) TSRMLS_CC)
+#endif
#endif
/*
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+
#ifndef PHP_HTTP_REQUEST_POOL_API_H
#define PHP_HTTP_REQUEST_POOL_API_H
+#ifdef HTTP_HAVE_CURL
#include "php_http_std_defs.h"
#include "php_http_request_api.h"
#define http_request_pool_dtor(p) _http_request_pool_dtor((p) TSRMLS_CC)
PHP_HTTP_API void _http_request_pool_dtor(http_request_pool *pool TSRMLS_DC);
+#endif
#endif
/*
<?php
include 'skip.inc';
checkver(5);
+checkcls('HttpRequestPool');
checkurl('www.php.net');
checkurl('pear.php.net');
checkurl('pecl.php.net');
<?php
include 'skip.inc';
checkver(5);
+checkcls('HttpRequest');
?>
--FILE--
<?php
<?php
include 'skip.inc';
checkver(5);
+checkcls('HttpRequest');
checkurl('www.google.com');
?>
--FILE--
<?php
include 'skip.inc';
checkver(5);
+checkcls('HttpRequest');
checkurl('arweb.info');
?>
--FILE--
function checkext($ext) { skipif(!extension_loaded($ext), "need ext/$ext"); }
function checkver($ver) { skipif($ver > (int) PHP_VERSION, "need PHP v$ver"); }
function checkurl($url) { skipif(!@fsockopen($url, 80), "$url not responsive"); }
+function checkcls($cls) { skipif(!class_exists($cls), "need class $cls"); }
checkext('http');
?>