The following $ username and $ password respectively refer to the user name and password, and $ sitekey is the site scrambling code.Password settingsUse javascript for processing when submittingT_code0.value = md5 (username. value "|" passwd. value )
CodeIgniter is an application development framework and toolkit for PHP website developers. She provides a rich set of standard libraries and simple interfaces and logical structures to help developers develop projects more quickly. CodeIgniter
Php filter html code filter html asp filter html code filter html tags asp filter html code
Function uh ($ str){
$ Tarr = array ("","", // leave this field blank if you want to clear insecure labels directly."\ 1 \ 2 ",);
$ Farr = array ("// \ S +/",
Invalid character filteringThis article focuses onPhp filters invalid charactersI didn't talk about asp functions for filtering invalid characters, but they all have the same idea.
) Filter the characters that affect the normal operation of
Php malicious code filtering function
Public Function DecodeFilter (html, filter)Html = LCase (html)Filter = split (filter ,",")For Each I In filterSelect Case ICase "SCRIPT" 'removes all client scripts such as javascept, vbscript, jscript, js, vbs,
A php verification code generated by a foreign website for download. This is a practical example. You can save it as php if you need it.
The Code is as follows:
Copy code
Session_start ();If (isset ($ _ POST ['submit ']) {If (
There is a premise that our page must be a php page. If you generate an html static page, this method is not feasible, next let's take a look at the php Code to prohibit IP segment access to the website.
The Code is as follows:
Copy
Because SQL injection is required to operate the database, it generally finds Keywords of SQL statements: insert, delete, update, and select to check whether the passed variable parameters are controllable and whether they have been safely processed.
In program development, SQL injection is a problem that everyone will often consider. I will analyze the common SQL anti-injection code below. If you need it, refer to it.
1. Basic principles of php Data submission and filtering
1) when submitting
I have previously met a malicious ddos attack on php code and occupied all the server resources, which makes the website unavailable. Next I will introduce the solution.
Solution
Modify the php. ini file
The Code is as follows:
Traffic attacks are a relatively primitive method of website attacks, that is, they constantly refresh the website, resulting in the server being unable to handle or the database being overloaded, an attack method that causes the website to fail to
Iii. Example of session Application
The following examples are for reference only. You can customize or not customize the session.(1) used for User AuthenticationSession_start ();$ Dbh = MySQL_connect ("localhost: 3306", "xxxx", "xxxx
UseCanonicalName directiveSyntax: UseCanonicalName on | off | dnsDefault: UseCanonicalName onContext: server config, virtual host, directoryOverride: OptionsCompatibility: UseCanonicalName is only available in Apache 1.3 and laterIn many situations
I. Preparations Apache2 (Win32) fully modular installation of perl, php, ssl1. An installed WIN2000 Server. Note: If IIS is already installed on your machine, stop all web sites in IIS or change the port to another one.2. Download SoftwareAPACHE 2.0.
These functions allow you to control the content output by your script. it can be used in many different situations, especially when your script has output information, you need to send a new file header. the output control function does not affect
The success or failure of a website has an extremely important relationship with the website planning before the website is built. Before establishing a website, you should clarify the purpose of website construction, determine the functions of the
What is a VM service?A virtual host service virtualizes a machine into multiple WEB servers. For example, a company wants to provide host hosting services, which provides WEB services for other enterprises. Therefore, it certainly does not prepare a
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