head.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef HEAD_H
  17. #define HEAD_H
  18. #define COOKIE_EXPIRES "; expires="
  19. #define COOKIE_MAX_AGE "; Max-Age="
  20. #define COOKIE_DOMAIN "; domain="
  21. #define COOKIE_PATH "; path="
  22. #define COOKIE_SECURE "; secure"
  23. #define COOKIE_HTTPONLY "; HttpOnly"
  24. #define COOKIE_SAMESITE "; SameSite="
  25. extern PHP_RINIT_FUNCTION(head);
  26. PHPAPI int php_header(void);
  27. PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t expires,
  28. zend_string *path, zend_string *domain, bool secure, bool httponly,
  29. zend_string *samesite, bool url_encode);
  30. #endif