X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_url_api.h;h=dc0089909674861d236a78e59d42e45c1f74aa1d;hp=48b2765bd86c222502bf6983d8bda6cfb0028f24;hb=d046681a7b929ef813849cfe38fbceb333f0b0eb;hpb=c64365b84429b86b4af55b283de3758af38d9369 diff --git a/php_http_url_api.h b/php_http_url_api.h index 48b2765..dc00899 100644 --- a/php_http_url_api.h +++ b/php_http_url_api.h @@ -17,11 +17,24 @@ #include "ext/standard/url.h" +extern PHP_MINIT_FUNCTION(http_url); + #define http_absolute_url(u) _http_absolute_url((u) TSRMLS_CC) PHP_HTTP_API char *_http_absolute_url(const char *url TSRMLS_DC); -#define http_build_url(o, n, p, s, l) _http_build_url((o), (n), (p), (s), (l) TSRMLS_CC) -PHP_HTTP_API void _http_build_url(const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC); +#define HTTP_URL_REPLACE 0x000 +#define HTTP_URL_JOIN_PATH 0x001 +#define HTTP_URL_JOIN_QUERY 0x002 +#define HTTP_URL_STRIP_USER 0x004 +#define HTTP_URL_STRIP_PASS 0x008 +#define HTTP_URL_STRIP_AUTH 0x010 +#define HTTP_URL_STRIP_PORT 0x020 +#define HTTP_URL_STRIP_PATH 0x040 +#define HTTP_URL_STRIP_QUERY 0x080 +#define HTTP_URL_STRIP_FRAGMENT 0x100 + +#define http_build_url(f, o, n, p, s, l) _http_build_url((f), (o), (n), (p), (s), (l) TSRMLS_CC) +PHP_HTTP_API void _http_build_url(int flags, const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC); #define http_urlencode_hash(h, q) _http_urlencode_hash_ex((h), 1, NULL, 0, (q), NULL TSRMLS_CC) #define http_urlencode_hash_ex(h, o, p, pl, q, ql) _http_urlencode_hash_ex((h), (o), (p), (pl), (q), (ql) TSRMLS_CC)