xref: /PHP-8.2/ext/standard/head.h (revision 01b3fc03)
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 
17 #ifndef HEAD_H
18 #define HEAD_H
19 
20 #define COOKIE_EXPIRES    "; expires="
21 #define COOKIE_MAX_AGE    "; Max-Age="
22 #define COOKIE_DOMAIN     "; domain="
23 #define COOKIE_PATH       "; path="
24 #define COOKIE_SECURE     "; secure"
25 #define COOKIE_HTTPONLY   "; HttpOnly"
26 #define COOKIE_SAMESITE   "; SameSite="
27 
28 extern PHP_RINIT_FUNCTION(head);
29 
30 PHPAPI int php_header(void);
31 PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t expires,
32 	zend_string *path, zend_string *domain, bool secure, bool httponly,
33 	zend_string *samesite, bool url_encode);
34 
35 #endif
36