Package:
Ads and content limit
Summary:
Keeps track of visitors to show limited ads a day
Groups:
Content management, Databases, User Management
Author:
lee
Description:
This class can be used to keeps track of visitors to show limited number of ads or content a day.
It checks the current user IP address in a MySQL database table to determine whether the user has already visited the site.
The class stores the current date and time in the database table if the user has not accessed the site today. Otherwise the class increments the number of accesses of the user.
It returns a condition to determine whether an ad can be displayed if the number of accesses did not exceed a given limit.