Initialize a CURL object
$curl = Curl_init ();
Set the URL you need to crawl
curl_setopt ($curl, Curlopt_url, ' http://bbs.it-home.org ');
Set Header
curl_setopt ($curl, Curlopt_header, 1);
Sets the curl
How to solve the problem of file size limitation in PHP? The main is to modify the configuration file php.ini content, to break the PHP upload file size limit.Starting with PHP 4.2.0, PHP will return a corresponding error code along with the file
Share several useful PHP string filtering, conversion functions for character handling and string handling.The following string filtering and conversion functions are included:NL2BR ();/\ n toAddslashes (); Stripslashes ();//Escape special
Example of string compression
$string =
"Http://bbs.it-home.org is PHP technical website. This website is personal website.php8848.com have many PHP and MySQL or other IT knowledage Articles,so Welcome to php8848. Com!please Enjoy it! It
Ini_set (' Pcre.backtrack_limit ', 999999999);
Copy CodeNote: This parameter is available after the PHP 5.2.0 release.About: Pcre.recursion_limitpcre.recursion_limit is the recursive limit for pcre, which, if set to a large value,
Create DATABASE ZZJZ CHARACTER SET GBK COLLATE gbk_chinese_ci;
CREATE TABLE zz_employees (EmployeeID int unsigned NOT NULL auto_increment primary key,name varchar (all) not Null,updatetim e datetime) CHARACTER SET gbk COLLATE gbk_chinese_ci;
$con = mysql_connect ("localhost", "Peter", "abc123");
if (! $con)
{
Die (' Could not connect: '. Mysql_error ());
}
Some code
?>
Copy CodeClosing a connection script closes the connection as soon as
//Method One (with system variables)
//Disadvantage do not use passed-over addresses and hosts that do not support system variables
Echo $_ server[' Http_host '];
//Method two (with self-function)
$url = '
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