url.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Jim Winstead <jimw@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef URL_H
  19. #define URL_H
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif
  24. void url_encode(char const *s, size_t len, char *out, size_t *out_len);
  25. void url_decode(char *str, size_t len, char *out, size_t *out_len); /* return value: length of decoded string */
  26. void raw_url_encode(char const *s, size_t len, char *out, size_t *out_len);
  27. void raw_url_decode(char *str, size_t len, char *out, size_t *out_len); /* return value: length of decoded string */
  28. char *replace_controlchars_ex(char *str, size_t len);
  29. #define PHP_QUERY_RFC1738 1
  30. #define PHP_QUERY_RFC3986 2
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* URL_H */
  35. /*
  36. * Local variables:
  37. * tab-width: 4
  38. * c-basic-offset: 4
  39. * End:
  40. */