How to Prevent the phpwind Forum from being maliciously registered and advertised by the Registrar

Source: Internet
Author: User
Tags php and mysql

Introduction: This is a detailed page to prevent phpwind from being maliciously registered and advertised by the Registration machine. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 335101 'rolling = 'no'>
Added the anti-automatic registration server verification code to the phpwind Background:

Recently, my Forum has a registration machine that maliciously registers and publishes advertisement information, which is annoying. I am trying to prevent malicious registration. The following are some methods: Method 1: change the name of the registry list (most effective, but you must have some knowledge about PHP and MySQL .) Modify the name of the content entered in the Registry form. This must be used with the data table, and the MySQL form keyword must also be changed. Method 2: Change the address of the website registration question to two files: register.htm and register. step 1 of PHP: Open the Forum template/wind/register.htm. Of course, this is the default style template. If you change the template, find the file under the name of the modified template. First, find a place. We recommend that you put it on it: edit-search for the <tr class = "f_one"> <TD width = "35%"> User Name <font color = "red"> in the following sentence: yes. Of course, you can modify the specific content of the problem <tr> <TD class = "f_one" width = "21%"> to prevent malicious registration problems: <br> <font color = "#000000"> how old is your mom aged 49 last year? </Font> </TD> <TD class = "f_one"> <input type = "text" name = "manianling" size = "4" maxlength = "4"> Please save the number in a space on the left </TD> </tr>, step 2: Open the register in the main directory of the Forum. PHP edit-find $ db-> Update ("insert into pw_members (username, password, email, publicmail, groupid, memberid, icon, gender, regdate, signature, introduce, OICQ, ICQ, site, location, bday, receivemail, YZ, signchange) values adds the following sentence to the sentence: Check whether the answer to the question is correct, specify if ($ manianli Ng! = 50) {showmsg ("people who don't care about their mom's age! Let's die !! "," Javascript: history. back () ");} Save, upload to space to replace the original file. method 3: Change register. the PHP name is to change the name of the registration page file, for example. change PHP to R. PHP or something. Note that the Register. PHP page of all links must be changed to R. php. Otherwise, it will become a whiteboard. There is no way to do this. There are many modifications that affect the upgrade and the current operation of the forum, but it is absolutely effective to put register first. change PHP to the name you want. Start by checking register. change PHP to your name, for example, welcome. phplogin. phpglobal. PHP 2 and then modify it in template/wind (all templates must be modified as long as they have the following files! Find register. php In faq.htmlogin.htmlang_email.phplang_other.phpregister.htm 3 simple_index.htmsimple_read.htmsimple_thread.htm and change the name of register. php after modification. For example, welcome. php does not need to set any additional information for this method! Method 4: Enter today's date 1. Modify register. PHP (register. PHP is located in the main directory): $ db-> Update ("insert into pw_members (username, password, email, publicmail, groupid, memberid, icon, gender, regdate, signature, introduce, OICQ, ICQ, site, location, bday, receivemail, YZ, signchange) added on values (modified by Chinese): If ($ nowday! = $ Nowday1) {showmsg ("the date is incorrect. You won't forget the number of today's day, will you? "," Javascript: history. back () ");} found: @ include_once (D_p. 'Data/bbscache/inv_config.php '); add $ nowday1 = gmdate ("D", $ timestamp + $ timeoffset * 3600) below ); $ nowday2 = gmdate ("m month D", $ timestamp + $ timeoffset * 3600000000002133 modify register.htm(register.htm in the/template/wind/register.htm directory or other style Directories: <tr> <TD colspan = "2" class = "head" Height = "25"> required information </TD> </tr> ): <tr> <TD class = "f_one" width = "21%"> Anti-malicious registration problem: what is the date of today? <Br> <font color = "blue"> enter 04 if the current date is January 1, December 04 </font> </TD> <TD class = "f_one"> <input type =" text "name =" nowday "size =" 4 "maxlength =" 4 "> prompt: enter <fontcolor = "# ff0000"> $ nowday1 </font> in the text box on the left (ignore the morning time difference) </TD> </tr> reminder: please delete the IDs previously registered by robots. Many robots are registered before and do not post messages, and then go wild on the specified date. If you find similar IDs, such as Lijian *, please delete them, retention is a hidden danger. Method 5: add the anti-automatic registration server verification code in the background. open template/admin/settings.htm to find <tr class = B> <TD> initial registration {$ db_moneyname}: (we recommend setting it to 0 .) </TD> <input size = 35 name = "Reg [regmoney]" value = "$ rg_regmoney"> </TD> </tr> Add <tr class = B> <TD> <font color = Red> Anti-automatic registration server verification code: </font> for example, "phpwinnd" (if it is set to null, it indicates that it is disabled) </TD> (Note: After modification, you must set your desired verification code in the background, <TD> <input size = 35 name = "Reg [autoreg]" value = "$ rg_autoreg"> </TD> </tr> 2. open admin/settings. PHP searches for if ($ Reg [' Regmaxname']> 15) {adminmsg ('illegal _ username');} Add $ Reg ['autoreg '] = str_replace ("","", trim ($ Reg ['autoreg ']); 3. open template/wind/register.htm to find <tr> <TD class = 'f _ one'> Confirm Password <font color = Red> * </font> </TD> <TD class = 'f _ one'> <input type = PASSWORD size = 20 maxlength = 75 name = 'regpwdrepeat'> </TD> </tr> Add it later <! -- EOT; if ($ rg_autoreg! = "") {Print <EOT --> <tr> <TD class = 'f _ one'> Anti-automatic registration server Verification Code <font color = Red> * </font> <fontcolor = red> <B> $ rg_autoreg </B> </font> </TD> <TD class = 'f _ one'> <input type = text size = 20 maxlength = 75 name = 'autoreg '> </TD> </tr> <! -- EOT;} print <EOT --> 4. Open the register. php file to find if (! $ Rg_rglower) {for ($ ASC = 65; $ ASC <= 90; $ ASC ++) {If (strpos ($ regname, CHR ($ ASC ))! = False) {showmsg ('username _ limit ') ;}}} add if ($ rg_autoreg! = "" & $ Autoreg! = $ Rg_autoreg) {showmsg ('Sorry, anti-auto-registration server Verification Failed! ');} Completed

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/335101.html pageno: 10.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.