Php restricts the refresh frequency of user calling app interface, which cannot reach 20 in 1 second. I have read many similar articles, but I don’t understand what they mean. Do you want to build a new table specifically to save the information of visitors or not? (New Programmer) Can you tell me how to do it? It is better to have code.
It is not recommended to do it in PHP. You can consider doing it in iptables in Nginx and Firewall.
For example, in Nginx, inside can be configured as follows:
Add before http inside server: limit_req_zone $binary_remote_addr zone=allips:10m rate=20r/s; Join in server inside: limit_req zone=allips burst=5 nodelay; If there are more than 20 connections per second, add IP to blacklist and deny these IP directly.
Note that all users mentioned above are identified by IP, and there is the possibility of accidental killing.