This is actually a real simple operation and thus this tutorial is also very simple, so you should have your user activity tracking in no time. Today we are just going to look at how to find out who's on your cakephp site, where they came from, which models and actions they are using and what browser they are using to do all this. We won't discuss how to display all the results here, that will be Part 2 of this tutorial so for now if you wish to view your results why not use PHPMyAdmin or WebYog or something so you can see the results - For purpose of this tutorial I will be using PHPMyAdmin to show you the results.
Object oriented programming principles encourage encapsulation, i.e. containing all the functionality inside a class. Usually this means member variables should be private or protected, one of the common ways to do this is with various set and get methods. In the case of a user class it may have setName, getName, setAge, getAge and so on. This can be time consuming to set up, change and maintain. The magic methods __set and __get provide a quick way to implement generic set and get methods.
One of the frequent problems is defining visitor?s screen resolution using JavaScript tools and passing this data to PHP-script. The following script provides solution for this problem:
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.