A collection of 23 tips on understanding and managing cookies in PHP. Clear explanations and tutorial exercises are provided on setting and receiving cookies, creating and removing persistent cookies, specifying domain and path to restrict cookies, finding cookies in cookie files, cookie limitations:
How To Send and receive a Cookie to the Browser?
How To Set a Persistent Cookie?
How To Remove a Cookie?
How To Specify Domain and Path for a Cookie?
How Cookies Are Transported from Servers to Browsers?
How To View Cookie Header Lines?
Where Are the Persistent Cookies Stored on Your Computer?
How To View the Content of a Cookie File?
How Many Cookies Can You Set?
How Large Can a Single Cookie Be?
How Are Cookies Encoded During Transportation?
How Can Other Webmaster Steal Your Cookies?
......
According to the cookie specification, any cookie set for one domain, must not be sent to any other domain. Therefore, if you set a cookie in your user's browser on one domain, that cookie will not be available on any other domain. This tutorial describes a solution to get around this issue.
This document describes how to customize the session handlers in PHP4. It provides examples of how to write a fully functional session handler that works with DBM files and one that works with a MySQL database.
A session is the time that a user spends at your Web site. Users may view many Web pages between the time they enter your site and leave it. Often you want information to be available for a complete session. Beginning with version 4.0, PHP provides a way to do this.
PHP allows you to set up a session and store session variables. After you create a session, the session variables are available for your use on any other Web page.
This Article takes you step by step in creating a member system for your site. From designing mySQL tables, creating a registration script and logging them in with sessions and cookies.
Learn how to use cookies to allow user downloading a file only once. Limit people from accessing things more than once. Simple comments and explanations.