PHP anti-injection is one of the technologies that our programmers must understand and hold, let me introduce some security practices for sensitive information in our programs.
The simple point is that you do not want to let others know the
This article uses three files to simply talk about how to apply Chinese verification code in PHP, Chinese characters may appear garbled so we define a file to deal with, the need for friends can refer to the next.
The code is as follows
As long as we have done all kinds of operations can be basic to prevent some friends to use the site itself, the vulnerability of Web site operations, many in PHP, such as XSS with htmlentities () to prevent XSS attacks and SQL injection can be used
PhpMyAdmin (http://www.phpwizard.net/projects/phpMyAdmin/) is a PHP tool for managing MySQL databases with a WEB-based interface. However, it is found to be flawed. You can choose to install a stable version of the new release:
PhpMyAdmin 2.2.0.
1.
We will hear this kind of sentence, in the network do not believe any input information, we have to do parameter filtering, below I will introduce the filter paging parameters, the need for friends to refer to.
Instance
The code is as
Procedures involved:
PhpMyAdmin
Describe:
phpMyAdmin Remote PHP Code injection Vulnerability
With:
phpMyAdmin is a free tool that provides a WWW management interface for managing MySQL.
phpMyAdmin There is a PHP code injection problem, remote
Generates random strings that can be used to generate passwords automatically.
Characteristics:
1. You can specify that the password contains numbers or characters, and the default is mixed mode
2. Specify discretionary password length, default
Mb_substr function is an upgraded version of the SUBSTR function, MB_SUBSTR supports Chinese interception and does not appear garbled problem, let me introduce mb_substr basic knowledge.
Cases
The code is as follows
Copy Code
PHP in PHP, the Curl component by default is not supported, the following small section to give you a windows2003 under the configuration of the Php_curl component of the text tutorial, I hope this method for everyone to help.
A) support for
CSRF station outside the type of vulnerability is in fact the traditional meaning of the external submission of data problems, the general programmer will consider some comments and other forms of comment watermark to prevent spam problems, but for
/*************************DescriptionDetermine if the passed variable contains illegal characterssuch as $_post, $_getFunction:Anti-injection**************************/To filter the illegal characters, this filtered character can also be
Remember what I said earlier about PHP Hash collisions DDoS vulnerability? Initially, the development team gave a fix, using the error (E_ERROR) if more than max_input_vars, resulting in the end of PHP error. Later, in order to solve this problem
PHP Universal anti-injection is mainly to filter some SQL commands and PHP post get the reference we/to filter some illegal characters, so as to prevent the basic injection, that the installation of the Apache server Setup method is also necessary.
(1) Open PHP Tutorial Safe mode
PHP's security model is a very important embedded security mechanism to control some functions in PHP, such as System (),
At the same time, a lot of file operation functions have permission control, also does not
PHP Filtering HTML PHP Filter HTML code Filter HTML ASP filter the HTML filter the Code filter HTML tag ASP filter HTML code
Function uh ($STR){
$tarr = Array (" ","",//If you want to clear unsafe labels directly, you can leave this blank"\\1\\2",);
System: FreeBSD 4.1
Install the gd-1.8.3 and libpng,jpeg6b with Sysinstall. Make sure you have libgd.so.* and libpng.so.* under the Usr/local/lib.
CD PATH_TO_PHP_SRC
./configure--with-mysql=/path_to_mysql
--with-apache=/path_to_apache_src
--with-gd=/
Web page screenshot Before we can only be implemented in ASP, let me introduce the use of a plug-in Linux in the implementation of PHP can also implement a screenshot of the page, I hope to help everyone.
Server-side
To implement the program must
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