+/* parse multibyte according to locale */
+#define PHP_HTTP_URL_PARSE_MBLOC 0x10000
+/* parse utf8 multibyte sequences */
+#define PHP_HTTP_URL_PARSE_MBUTF8 0x20000
+/* convert multibyte hostnames to IDNA */
+#define PHP_HTTP_URL_PARSE_TOIDN 0x100000
+/* percent encode multibyte sequences in userinfo, path, query and fragment */
+#define PHP_HTTP_URL_PARSE_TOPCT 0x200000
+
+typedef struct php_http_url {
+ /* compatible to php_url, but do not use php_url_free() */
+ char *scheme;
+ char *user;
+ char *pass;
+ char *host;
+ unsigned short port;
+ char *path;
+ char *query;
+ char *fragment;
+} php_http_url_t;
+
+PHP_HTTP_API php_http_url_t *php_http_url_parse(const char *str, size_t len, unsigned flags TSRMLS_DC);
+PHP_HTTP_API void php_http_url_free(php_http_url_t **url);
+