As shown in the figure below, many Taiwanese IPs use software every day to register a lot of spam users in batches, and then post, which makes many webmasters troubled by this.
How to prohibit Taiwanese IP address registration?
discuz registration function in /source/class/class_member.php file on_register method, let's modify it for testing.
We log out, and then click Register again, and find that this IP address has been resolved into a physical address using the Innocence Database, as shown in the figure below:
We only need to convert the IP into a physical address and then determine whether the string contains the word "Taiwan"!
The full code is as follows:
Tourists, if you want to see the hidden content of this post, please Reply In this way, it is perfectly prohibited to register IP in Taiwan on the DZ forum!
|