CURL Learning Notes and summarizing (1) concepts

Source: Internet
Author: User

Concept:

CURL (client URL Library Functions) is a command lines tool for transfering the data with URL syntax (which uses the URL syntax to transfer the commands of the database), that is, the client to the service Tool to request resources.

Usage scenarios:

① Web page resources (e.g., web crawler authoring)

②webservice Data Interface resources (such as dynamic access to interface data, such as weather, number attribution, etc.)

③FTP file Resources in the server (download files from FTP server)

④ Other resources (all resources on the network can be accessed and downloaded using CURL)

Using CURL in PHP

confirm that PHP supports CURL

Under Windows:

In the cmd command line (need to add the PHP installation path to the environment variable) input

Php-i

Or

Php-m

or in browser input localhost view phpinfo

Find CURL. For example, in Phpinfo:

  

Under Linux, use the command:

See if PHP supports CURL.

When PHP does not support curl, you will need to install the Curl extension .

② adding CURL Support

Reference: http://www.cnblogs.com/airy/archive/2011/07/08/2100390.html

Using CURL in PHP

① initializing CURL

Curl_init ()

② send request to server ③ accept server data

Curl_exec ()

④ Turn off CURL

Curl_close ()

CURL Learning Notes and summarizing (1) concepts

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.