Content management: Ads and content limit
Lee Johnstone (contact me)
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.
Click here for detailed information about this class on phpclasses.org