This article is a mirror article of machine translation, please click here to jump to the original article.

View: 95329|Reply: 27

[Website Building Knowledge] Discuz prohibits the registration of Taiwanese IP addresses

[Copy link]
Posted on 10/10/2018 10:43:37 PM | | | |
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, pleaseReply

In this way, it is perfectly prohibited to register IP in Taiwan on the DZ forum!




Previous:Tutorial on deploying rap2 with docker under Centos 7
Next:C# login to Wordpress
 Landlord| Posted on 8/10/2021 1:34:00 PM |
Fixed a case where there were multiple layers of proxy IPs

X-Forwarded-For multiple IP addresses in the HTTP request header
https://www.itsvse.com/thread-9654-1-1.html
function on_register() method, code:


Posted on 2/10/2022 9:56:30 PM |
I implore the landlord to point out, where to put this code, in the function on_register(), you are afraid that there will be a problem with the insertion, resulting in abnormal files, and the program is not understood, so I beg the brother to explain, thank you I am using the DISCUZ3.2 version,
 Landlord| Posted on 6/10/2020 9:37:47 AM |
lastdream posted on 2019-8-21 16:42
It doesn't work, is there a new way now?

Since I used a reverse proxy

You change $_SERVER['HTTP_X_FORWARDED_FOR'] to $_SERVER['REMOTE_ADDR']; Try
Posted on 6/15/2019 4:51:54 PM |
How to modify it.
Posted on 7/19/2019 12:29:37 AM |
In this way, it is perfectly prohibited to register IP in Taiwan on the DZ forum!
Posted on 7/26/2019 3:21:34 PM |
kankan
Posted on 8/10/2019 11:39:31 AM |
Look, needed
Posted on 8/21/2019 4:33:59 PM |
Taiwanese IP address registration is prohibited
Posted on 8/21/2019 4:42:11 PM |
It doesn't work, is there a new way now?
Posted on 10/1/2019 5:27:33 PM |
Discuz prohibits the registration of Taiwanese IP addresses
Posted on 11/20/2019 4:48:56 PM |
How to write
Posted on 4/15/2020 3:17:58 PM |
Refer to it!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com