Principle: Read the source files of a website and analyze the source code using regular expressions to obtain all links.
/********** Qiushuiwuhen (2002-5-20 )***********/If (empty ($ url) $ url = "http://www.csdn.net/expert/"; // set url$ Site =
Use the iconv Method for encoding conversion. It works normally on the windows platform (win7 is used in the local environment), but iconv always returns false in the linux environment (linux used in the testing environment ).
According to the
The difference between PHP trim function LTrim function RTrim function
Everyone knows that the trim () function of PHP, the LTrim () function, the RTrim () function can remove the space, so what are the different differences between the three in
Parsing of PHP cache OB series functions (reproduced)
Reprint Original Address:
Http://hi.baidu.com/imdao/blog/item/723e7e8b589b5e11c8fc7ada.html
for ($i =10; $i >0; $i--)
{
echo $i;
Flush ();
Sleep (1);
}
?>
According to the PHP manual,
This
Let's take a look at how the manual defines the Fsockopen function.
Fsockopen― open a network connection or a UNIX socket connection.
Resource fsockopen (String $hostname [, int $port =-1 [, int & $errno [, String & $errstr [, float $timeo UT =
1.php Interface Class: interfaceIn fact, their role is very simple, when a lot of people to develop a project, it may be to call someone else to write some of the classes, then you will ask, how do I know how the implementation of one of his
The static member function of the PHP class is more efficient than the ordinary member function of the class.Example://php static method testHeader(' content-type:text/html; Charset=utf-8 ');classxclass{ Public Static $var 1= ' 1111111111111111 ';
This article mainly introduces PHP implementation of the enhanced Mhash function, using the default Mhash function times wrong, found two solutions, need friends can refer to the next
Today, using PHP's encryption function Mhash, the error: Fatal
Recently, while looking at the code of a cow, see a very useful function: Extract (), its main role is to expand the array, the key name as variable name, element value is variable value, you can say that the operation of the array provides another
There are a lot of ways. The more commonly used is the IFRAME to do so. Now you have Ajax, so it's usually Ajax.The first method, AJAX implementation:Of course, the use of Ajax is really very simple can be achieved, but there is a lot of knowledge
I. OpenSSL INTRODUCTIONData encryption is an important part of information transmission. Any information is transmitted in clear text, which is indeed a very unsafe practice. So,The data needs to be encrypted. Converts plaintext data to ciphertext
We all know that there are many kinds of ways to delete array elements in PHP, and the functions that are often used are PHP array_unique (). So the PHP function we introduced today Array_flip () is about 5 times times more efficient than the
Because PHP's color table parameters can only support 256, in order to achieve the display of 8 colors or more ribbons, I used the method of parameter transfer to achieve. The code for the implementation is as follows:
1, raw color with graphics
In PHP programming, we often encounter cell data problems with arrays, such as applying custom functions to each cell in the array.
One method is to iterate through the entire array, call the custom function on each cell, and replace the value of
1, year-month-dayecho Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Capital Y represents a four-digit year, while lowercase y represents a two-digit number for the year;
Lowercase m represents the number of months (with leading), while
In the development process, encountered data processing to take the whole time, you will use which, small Tao to introduce: PHP take the whole function has ceil,floor,round,intval, the following detailed introduction:
1, ceil-into one method to
The PHP array function is a very powerful collection of functions. We can sort, delete, and merge the arrays by using these functions. Today we will introduce you to the PHP array function in the actual application of what will play a role. Hope to
Because PHP's color table parameters can only support 256, in order to achieve the display of 8 colors or more ribbons, I used the method of parameter transfer to achieve. The code for the implementation is as follows:
1, raw color with graphics
function | Chinese Characters | graphics | display /******************************
How to display Chinese characters in PHP graphics function, we have been asking for a long time, but there has been no results. Finally in the reference to another
// Compare string, returns the first region of the two strings with the same characterStatic void php_similar_str (const char * txt1, int len1, const char * txt2, int len2, int * pos1, int * pos2, int * max){Char * p, * q;Char * end1 = (char *) txt1
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.