Comment submit comments using the robot who does a headache, use authentication code though effective against, but the user experience have sent,Is the so-called people to the base are invincible, have to use the cheap trick to deal with slut! Issued today aim is to bring more headaches spam slut.People know to use Wordpress, the comment form submitted with author, email, url and comment the content of the four projects,Corresponding respectively nickname, e-mail, web site address, and commentary, slut like to go to their web site posted, then start from the start url.The first is the original input box enter the url of the ID and name changes for the trueurl, name taken lightly, and later correspondence on the line,Then create an input box input box, the id and the name written in url, clever you thought of doing was right, hehe.Then open the wp root directory of the wp-comments-post.php,Find the first 45 lines of content, the url changes as the first step to change your name above, such as print my view the source code to help 1 $ comment_author_url = (isset ($ _POST ['trueurl']))? Trim ($ _POST [' trueurl ']): null;Save this comment written to the database when the record before us the website address is changed to trueurl the input box content.Next we have to be a judge. In line 67, add the following below: View the source code to print to help 1if (! $ User-> ID) (2 $ uurl = trim ($ _POST [url]);3if ($ uurl <> "") (4wp_die (__ ('Error: Please keep the fourth blank [Are you mentally handicapped is a sad comment on the robot? Hahaha BY http://L4EVER.cn'));5)6)Because the relationship between encoding, the Chinese will be above the actual output when the display garbled, then converted to UTF-8 it. OK, great service mess, comments that the robot will complete the url input box, and if the input box to fill in the url , let's not let him submit.If you want to record who submitted a spam, then the above line of code inside the upper wp_die Add a: View the source code to print to help 1error_log (date ("[Ymd H: i: s ]")." - [". $ _SERVER ["REMOTE_ADDR "]."] - [". $ uurl. "]". " n", 3, "spam.txt");Then over a period of time to see if there are no comments spam.txt robot hook it. Haha.* Unix hosting Note that there do not have permission to create and write spam.txt, you can manually create spam.txt, then set to 777,
Wordpress Anti Comment robot ultimate Dafa
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《Wordpress Anti Comment robot ultimate Dafa》
文章链接:https://www.skykkk.com/archives3277.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
文章名称:《Wordpress Anti Comment robot ultimate Dafa》
文章链接:https://www.skykkk.com/archives3277.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
相关推荐
- 暂无文章