Today we're going to look at the PHP captcha, we do it with a simple digital captcha, and first write a code to generate the CAPTCHA:
code is as follows
&nbs P;
//randomly generate a 4-digit number validation
IIS is used as a Web server under Win7, but recently because of the requirements of the project, it is necessary to automatically make a turn when the server encounters a 404 error (not on the client's jump, but when the server receives the client
php to make Unicode codec online conversion tool code sharing The code is as follows: 0) {//two bytes of text $STR. = ' u ' base_convert ord ($c). Str_pad (Base_convert (Ord ($c 2), a), 2, 0, str_pad_left); } else { &
This article is a PHP ASCII code conversion class for a detailed analysis of the introduction, the need for friends to refer to the
copy code code as follows:
class ASCII { function decode ($STR) { Preg_match_all ("/(d{2,5})/", $str, $a); $
The leader wants me to plan a webpage design contest and the Flash creation contest, the request must realize the on-line registration and the uploading work. I realized the requirement through FREEBSD+APACHE+PHP+MYSQL+FTP.
The idea of online
(1) PHP retains three decimal places and rounded
The code is as follows
$num = 0.0215489;Echo sprintf ("%.3f", $num); 0.022
(2) PHP keep three decimal digits not rounded
The code is as follows
If your site or blog has an inline Facebook page, you might want to know how many fans you have. This code will help you check the number of Facebook fans, remember, and don't forget to add the code to the second line of your page ID. The code is
Encryption and decryption is a common task, and here is an encryption and decryption class. If you want to retrieve the original password for him or her when the user forgets the password, this class is a useful tool User registered password
This article mainly describes the PHP implementation of the CC attack defense and prevent the Quick Refresh page example, the need for friends can refer to theThe code is as follows: = $refresh) {//Jump to attack Server address header (sprintf ('
First, the question:
Today header ("Location: $url"), the previous jump can always be, today is not moving, just output results, the past to confirm the check, $url the value of the correct, so in front of the echo $url; The result is an invalid
This article mainly introduced the PHP reflection application example, needs the friend to be possible to refer to, the code is very simple, looks directly at the following codeThe code is as follows:
This article mainly introduces the use of PHP to get the classification of Taobao ID method, we refer to the use of itThe code is as follows: $url = "http://list.taobao.com/browse/cat-0.htm"; $html = file_get_contents ($url); Echo ' '; $pattern
PHP output includes the Web page display and pop-up information box content.
Garbled generally is the browser to choose the display code and the encoding of the Web page is caused by different, although web surfers can manually select the code to
This article mainly introduces PHP to determine whether the JSON format method, the need for friends can refer to theThe first thing to remember is that Json_encode returns a string, and Json_decode returns an object-judging data that is not in JSON
This article mainly introduces the PHP full angle conversion function, the current can find all the corners are listed to replace it, the need for friends can refer to the following Previously tried to find the Internet through the ASCII
This article mainly introduces the PHP time to perform task Setup method, very simple, there is a need for small partners under the reference.
Today, a buddy of mine asked me this question. He has an IIS server that is scheduled to execute a
This article mainly introduces the PHP implementation limit download speed example, need friends can refer to the following Code as follows://local file, should be send to the client $local _file = ' test-file.zip '; //filename that the user
Let's look at the solution to the problem of PHP Fatal error:cannot use object of type StdClass as array error in PHP development.
The following error occurred with the normal array
The code is as follows
Array ([0] =>
It is not difficult to get the error message when the page is blank when a fatal error occurs in the program. The main use of two functions:
Error_get_last () Gets the last occurrence of the error message: The structure is as follows:
This article mainly introduces the PHP access QQ QQ Information method, example analysis of PHP access to QQ information and the principle of the corresponding implementation skills, with a certain reference value, the need for friends can refer to
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