ASP program filters the function call of the sensitive word

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In the industry also engaged for a long time, many of the friends who do the site may have a headache for this problem, is the site information audit and inspection, if the illegal information on the site, then all the efforts will be futile, the site's trust will drop very low, I have done several stations, the maintenance of the basic can be controlled very low, There's something I think is the key to this station is also very proud of the place, function filter illegal keywords, so that with illegal keyword information submitted, save a lot of maintenance, but also in the constant increase in the number of sensitive words, now basically information class common has been submitted, download down directly can follow the instructions to use. A lot of people asked me to ask the same question, and now I published, the function of the copyright belongs to the original author, I just added some use of extension and flexibility, but also more important is to increase the information class site common keywords. Instructions for use are as follows:

ASP file inside is a function, call directly on the line

The principle of the function: the existence of sensitive words automatically converted to "* * *" this symbol, and then to determine whether there is a "* * * * In the content, there is a hint of information is illegal, prohibit the submission. The previous function of the child or replacement, I did a little bit of strengthening, directly prohibit the submission,

function is the nd_say_what () function, which means to convert the sensitive word to "* *"

For example, I have a member can submit the form input box is title and content, then use the following:

Aas=nd_say_what (Trim (Request.Form ("title")) "replaces the sensitive word in title with" * * "

Bbs=nd_say_what (Trim (Request.Form ("content")) ' principle ditto

If InStr (AAS, "* *") =0 and InStr (BBS, "* *") =0 Then

< here when there is no sensitive word to deal with the situation, the following is the presence of sensitive words jump tips >

Else

Response.Write ("<script language= ' JavaScript ' > alert (' Your submitted information is restricted! '); location.href= ' # ';</script> ')

End If

Basic common sensitive words I have added, then to continue to add sensitive words to words.asp inside the copy of the two lines between the content, modified the inside of the Chinese characters for the new added sensitive words on the line.

The above information for the Yunnan Electronic Commerce Research Station original, A5 first, reprint please attach http://www.xiongmaotou.com/post/6.html

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.