PHP4 User Manual: function-CURL_PHP tutorial

Source: Internet
Author: User
Tags gopher
PHP4 User Manual: function-CURL. XI. CURL: the client URL library function PHP supports libcurl (you can use different protocols to connect and communicate with different servers )., Libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and XI. CURL functions.
PHP supports libcurl (you can use different protocols to connect to and communicate with different servers )., Libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and ldap protocols. Libcurl also supports HTTPS Certificate authorization, http post, http put, FTP upload (of course, you can also use PHP ftp extension), HTTP Basic form Upload, proxy, cookies, and user authentication.
To use the CURL function, you need to install the CURL package. PHP requires you to use CURL 7.0.2-beta or later. If the CURL version is earlier than 7.0.2-beta, PHP will not work.
To support php curl, you must re-compile PHP with the -- with-curl [= DIR] parameter (DIR is the directory containing the library and header files ).
These functions are added in PHP 4.0.2.
Once you compile PHP with CURL support, you can use the curl function. The basic idea is: you use the website construction server script \ phpphp user manual fancyfunction.curl-init.html> curl_init () function to initialize the CURL session, and then you can set all your options and execute them through the curl_exec () function, finally, you can use the curl_close () function to end your session. The following is an example: put the PHP homepage back into a file.
Example 1. use the php curl module to retrieve the PHP homepage Directory list curl_init-initialize a CURL session curl_setopt-set an option for CURL call curl_exec-execute a CURL session curl_close-close a CURL session curl_version-return the current CURL version

Http://www.bkjia.com/PHPjc/532354.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532354.htmlTechArticleXI. CURL, client URL library function PHP supports libcurl (allows you to connect and communicate with different servers using different protocols )., Libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and...

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.