1999-04-17 00:37:12 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2019-01-30 09:03:12 +00:00
|
|
|
| Copyright (c) The PHP Group |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2000-07-24 01:40:02 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2000-07-24 01:40:02 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 08:29:35 +00:00
|
|
|
| Author: Jim Winstead <jimw@php.net> |
|
1999-04-17 00:37:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
#ifndef URL_H
|
|
|
|
#define URL_H
|
2000-03-07 04:28:43 +00:00
|
|
|
|
2000-07-29 22:32:21 +00:00
|
|
|
typedef struct php_url {
|
2017-08-06 09:48:05 +00:00
|
|
|
zend_string *scheme;
|
|
|
|
zend_string *user;
|
|
|
|
zend_string *pass;
|
|
|
|
zend_string *host;
|
1999-04-17 00:37:12 +00:00
|
|
|
unsigned short port;
|
2017-08-06 09:48:05 +00:00
|
|
|
zend_string *path;
|
|
|
|
zend_string *query;
|
|
|
|
zend_string *fragment;
|
2000-07-29 22:32:21 +00:00
|
|
|
} php_url;
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2001-06-13 17:04:36 +00:00
|
|
|
PHPAPI void php_url_free(php_url *theurl);
|
2004-01-25 00:30:50 +00:00
|
|
|
PHPAPI php_url *php_url_parse(char const *str);
|
2014-10-23 08:18:59 +00:00
|
|
|
PHPAPI php_url *php_url_parse_ex(char const *str, size_t length);
|
2021-01-15 11:30:54 +00:00
|
|
|
PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port);
|
2014-10-23 08:18:59 +00:00
|
|
|
PHPAPI size_t php_url_decode(char *str, size_t len); /* return value: length of decoded string */
|
|
|
|
PHPAPI size_t php_raw_url_decode(char *str, size_t len); /* return value: length of decoded string */
|
|
|
|
PHPAPI zend_string *php_url_encode(char const *s, size_t len);
|
|
|
|
PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len);
|
|
|
|
PHPAPI char *php_replace_controlchars_ex(char *str, size_t len);
|
1999-04-17 00:37:12 +00:00
|
|
|
|
2005-12-04 17:44:27 +00:00
|
|
|
#define PHP_URL_SCHEME 0
|
|
|
|
#define PHP_URL_HOST 1
|
|
|
|
#define PHP_URL_PORT 2
|
|
|
|
#define PHP_URL_USER 3
|
|
|
|
#define PHP_URL_PASS 4
|
|
|
|
#define PHP_URL_PATH 5
|
|
|
|
#define PHP_URL_QUERY 6
|
|
|
|
#define PHP_URL_FRAGMENT 7
|
|
|
|
|
2011-01-08 02:21:44 +00:00
|
|
|
#define PHP_QUERY_RFC1738 1
|
|
|
|
#define PHP_QUERY_RFC3986 2
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
#endif /* URL_H */
|