What the class has to share with you today is how to learn the underlying workings and principles of PHP, a dynamic language for web development. Specifically, it is a software framework that implements a large number of components in the C language.
By using this code snippet, you can easily extract all the links on any Web page.
$html = file_get_contents (' http://www.example.com ');
$dom = new DOMDocument ();
@ $dom->loadhtml ($html);
Grab all the
A very simple function to generate a. csv file from a PHP array. This function uses the Fputcsv PHP built-in function to generate a comma-delimited file (. CSV). The function has 3 parameters: data, delimiters, and CSV enclosure, which are double
The implementation principle first calculates the four points of the rectangle around the point, and then uses latitude and longitude to directly match the records in the database.
Get surrounding coordinates
Public Function
$query = "SELECT count (IP) as count_ip from tb_count04";
Querying the total number of IP accesses in the database
$result =mysql_query ($query);
$countes =mysql_result ($result, 0, ' count_ip ');
Creating a canvas
The PHP form submits the page check box after the name to add [], so that the receiving page to get the correct results. The form is submitted with an array, and then the specific Vaule value of the form is obtained by accessing the array elements.
function Getfirstchar ($s 0) {
$fchar = Ord (substr ($s 0, 0, 1));
if ($fchar >= ord ("a") and $fchar = ord ("a") and $fchar
$s = Iconv ("UTF-8", "gb2312", $s 0);
$ASC = Ord ($s {0}) * n + ord ($s Beckham)-65536;
if ($asc >=
function random_readable_pwd ($length =10) {
The wordlist from which the password gets generated
(change them as)
$words = ' Dog,cat,sheep,sun,sky,red,ball,happy,ice, ';
$words. = ' Green,blue,music,movies,radio,green,turbo,
Sometimes in order to adjust the interface periodically, the program needs to run automatically. There are two ways to do this from the Internet: 1, Ignore_user_abort () Ignore_user_abort () functions with Set_time_limit (0) and sleep ($interval)
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