-
Weibo websites have been widely used in various industries, and spam targeting Weibo websites has also appeared in large numbers. This article discusses how to effectively prevent spam and spam on Weibo websites.
StatusNet, a microblogging program from Canada, has gradually been accepted by microblogging websites around the world with its free, open source and stable performance, and has been deployed in large numbers around the world;
Due to its extensive use, many international Blogspam (spam promotion) turned their attention to statusnet. They used registration robots to publish a large number of spam links on many websites using statusnet, which caused huge troubles to Weibo website management. The following is provided for everyone A few tricks to deal with these junk link publishers;
1. Enable email verification plug-in
StatusNet does not have an email verification function by default, which can cause a large number of registration robots to register crazily;
Enable method: Add the following code to config.php:
addPlugin('RequireValidatedEmail'); //Verify your email before sending messages
This function requires registrants to verify their email address before sending information, which can prevent a large number of useless spam links from appearing on the website;
2. Enable the plug-in to prevent malicious registration
Enable method: Add the following code to config.php:
addPlugin('RegisterThrottle');//Anti-malicious registration
In this way, the same IP can only register 3 user names within an hour, which can effectively prevent it from registering a large number of user names;
In addition, you can also set only one registration within an hour. Open the RegisterThrottlePlugin.php file under /plugins/RegisterThrottle/ and modify the following parameters:
public $regLimits = array(604800 => 10, //Limit the number of weekly registrations
86400 => 6, //Limit the number of registrations per day
3600 => 1); // Limit the number of registrations per hour
In this way, a large number of spam accounts will not be generated.
3. Enable blacklist plug-in
Enable method: Add the following code to config.php
addPlugin('Blacklist');//Blacklist plug-in
After adding, you can add one more blacklist setting on the administrator control panel, and you can add URLs and user names that are prohibited from registration, one per line and displayed in multiple lines;
In addition, after the addition is successful, log in to the website as an administrator. If the account is spam, you will also be prompted to add the current username and URL to the blacklist;
However, it should be noted that if you add a username to the blacklist, you may be unable to register normally, prompting: You cannot use this username on the current website;
However, you can use the normal URL blacklist. URLs added to the blacklist can not only be blocked on the "Personal Home Page", but can also be blocked from being used in sent messages;
Through the above methods, spam can basically be effectively controlled. In addition, you can also try to use a mixture of the following methods, and the effect may be better:
4.Verification code plug-in
That is to enable the Recaptcha plug-in, but first go to the website to apply for a key, and then add the applied key to the configuration file.
Add the following code to config.php, for example:
//Registration verification code
include_once('plugins/recaptcha/recaptcha.php');
$captcha = new recaptcha("6LeCRwkAAAAAADos9JN1XBp5jBI9r9D1dBuv","6LeCRwkAAAAsScTquvlT4n4cH03aDFgS", showErrors);
However, the verification code of Recaptcha is quite difficult. Ordinary users may not know how many times they have to enter it before they can enter it correctly, so use it with caution. At the same time, there seems to be some problems with Chinese support;
5. Enable the SubscriptionThrottle plug-in to prevent a large number of subscriptions. It is recommended to enable it;
6. Enable the UserFlag plug-in, but I have not yet figured out whether it has any effect;
7. Enable the BlogspamNet plug-in: a plug-in to prevent blog spam. The effect has not been successfully tried and cannot be described;
This article was originally published on the "IT Flies" blog. Please indicate the original address when reprinting; itfis.com
Thanks for the contribution on Suixin Weibo