- setcookie() must be called before any output to the HTTP response. The main reason is that PHP is not buffering the HTTP response. But you can alter this behavior by using the ob_start() functions.
- A persistent cookie is stored in a cookie file on the browser's local machine.
- A persistent cookie can have an expiration time expressed in number of seconds since epoch.
- Web browser will only send back a cookie when both domain and path match the requested domain and path.
- To make a cookie available for all sub domains of a top level domain, set the domain property to the top level domain name.
Total Pageviews
Friday, November 12, 2010
Sending and Receiving Cookies in PHP Scripts
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment