News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Tracking User Activity in PHP with Cookies and Sessions
May 25, 2011 @ 08:53:42

<> On PHPBuilder.com today there's a new tutorial from Leidago Noabeb showing how you can track your website's users with the help of sessions and cookies, the handling for which are already included in PHP.

So, why can't you maintain state with HTTP? The main reason is because HTTP is a stateless protocol, meaning that it has no built-in way of maintaining state between transactions. For example, when a user requests one page followed by another, HTTP does not provide a way for us to tell which user made the second request. In this article we will look at what maintaining state in PHP applications entails.

They introduce cookies and how they can be used to store information about the user's session on their client for a certain amount of time. This makes it much simpler for the cross-page or cross-session details to persist. There's a bit of code showing how to set and get a cookie and how to do the same with a session.

0 comments voice your opinion now!
tutorial track user cookie session introduction


blog comments powered by Disqus

Similar Posts

HowTo Forge: Fedora 8 Server Setup - LAMP, Email, DNS, FTP, ISPConfig - Page 6

SitePoint PHP Blog: How to Roll Your Own JavaScript Compressor with PHP and the Closure Compiler

DevShed: Authentication Scripts for a User Management Application

Jani Hartikainen's Blog: Zend_Acl part 2: different roles and resources, more on access

PHPit.net: Handling dates and times in PHP & MySQL


Community Events





Don't see your event here?
Let us know!


configure unittest list laravel symfony introduction voicesoftheelephpant framework opinion threedevsandamaybe series community language version interview conference podcast composer release api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework