Back to index

php5  5.3.10
url.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Jim Winstead <jimw@php.net>                                  |
00016    +----------------------------------------------------------------------+
00017  */
00018 /* $Id: url.h 321634 2012-01-01 13:15:04Z felipe $ */
00019 
00020 #ifndef URL_H
00021 #define URL_H
00022 
00023 typedef struct php_url {
00024        char *scheme;
00025        char *user;
00026        char *pass;
00027        char *host;
00028        unsigned short port;
00029        char *path;
00030        char *query;
00031        char *fragment;
00032 } php_url;
00033 
00034 PHPAPI void php_url_free(php_url *theurl);
00035 PHPAPI php_url *php_url_parse(char const *str);
00036 PHPAPI php_url *php_url_parse_ex(char const *str, int length);
00037 PHPAPI int php_url_decode(char *str, int len); /* return value: length of decoded string */
00038 PHPAPI int php_raw_url_decode(char *str, int len); /* return value: length of decoded string */
00039 PHPAPI char *php_url_encode(char const *s, int len, int *new_length);
00040 PHPAPI char *php_raw_url_encode(char const *s, int len, int *new_length);
00041 
00042 PHP_FUNCTION(parse_url);
00043 PHP_FUNCTION(urlencode);
00044 PHP_FUNCTION(urldecode);
00045 PHP_FUNCTION(rawurlencode);
00046 PHP_FUNCTION(rawurldecode);
00047 PHP_FUNCTION(get_headers);
00048 
00049 #define PHP_URL_SCHEME 0
00050 #define PHP_URL_HOST 1
00051 #define PHP_URL_PORT 2
00052 #define PHP_URL_USER 3
00053 #define PHP_URL_PASS 4
00054 #define PHP_URL_PATH 5
00055 #define PHP_URL_QUERY 6
00056 #define PHP_URL_FRAGMENT 7
00057 
00058 #endif /* URL_H */
00059 
00060 /*
00061  * Local variables:
00062  * tab-width: 4
00063  * c-basic-offset: 4
00064  * End:
00065  */