Introduction to malicious characters

Source: Internet
Author: User
Using PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data in the malicious word repertoires characters can be instantiated. Example 1, determine if a character exists code as follows copy Code function Is_bad_chars ($str) {$bad _chars = array ("\", "'" ' "'", ' "', '/', ' * ', ', ', ')," R "," T "," N ", ' $ ', ' (', ') ', '% ', ' + ', '? ', '; ', ' ^ ', ' # ', ': ', ' ', ' ', ' = ', ' | ', '-'); foreach ($bad _chars as $value) {if (Strpos ($str, $value)!== false) {return TR

1. PHP to determine if there is a malicious character instance _php tutorial

Summary: PHP Determines if there are instances of malicious characters. The use of PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data is not malicious word Fuku

2. PHP Filter all malicious characters (batch filter post,get sensitive data) _php tutorial

Summary: PHP filters all malicious characters (batch filtering post,get sensitive data). Function code: Copy code code as follows://php bulk filter Post,get sensitive data if (GET_MAGIC_QUOTES_GPC ()) {$_get = Stripslashes_array ($_get); $_post = Stripsla Shes_array ($_pos

3. PHP filters all malicious characters (batch filter post,get sensitive data)

Summary: PHP filters all malicious characters (batch filtering post,get sensitive data). Function code: Copy code code as follows://php bulk filter Post,get sensitive data if (GET_MAGIC_QUOTES_GPC ()) {$_get = Stripslashes_array ($_get); $_post = Stripsla Shes_array ($_pos

4. PHP Filter Malicious characters

Introduction: PHP Filters for malicious characters

5. PHP to determine if there are instances of malicious characters

Introduction: Using PHP to filter the principle of malicious characters is very simple we just define the characters and then use the foreach traversal of the malicious word repertoires, using Strpost to detect whether the user submitted data in the malicious word repertoires characters can be instantiated. Example 1, determine if the character exists, the code is as follows ...

6. PHP Filter all malicious characters (batch filtering post,get sensitive data) _php tips

Introduction: Recently Dedecms reported loopholes constantly, here to share the filter function of PHP, Daniel floated over it, to the small black to learn to communicate with

"Related question and answer recommendation":

How PHP filters Rlo characters to prevent text flipping

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.