Implementation idea: First, create a table, such as the following
CREATE TABLE ip_log
(
ip_log_ip VARCHAR(40),
ip_log_date DATE,
ip_log_visits TINYINT(1),
ip_log_page varchar(255),
PRIMARY KEY(ip_log_page,ip_log_ip,ip_log_date),
);
Then, write code to record the IP information when the user visits. The initial value of the number of views is 1,
When the number of pages viewed is equal to the set value, the user is not allowed to access.
Finally, you can run a cron table at 00:00 every night to delete all data, such as using truncate