亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Basic principles of cURL

cURL

curl is an open source file transfer tool that uses URL syntax to work in command line mode. It can obtain various files from the Internet. Various network resources. Simply put, curl is an upgraded version of crawling pages.

The simplest model is the one shown below:

QQ截圖20161105153711.png##

<?php
 //1.初始化,創(chuàng)建一個新cURL資源
 $ch = curl_init(); 
//2.設(shè)置URL和相應(yīng)的選項
 curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com/");
 
curl_setopt($ch, CURLOPT_HEADER, 0); 
//3.抓取URL并把它傳遞給瀏覽器
 curl_exec($ch); 
//4.關(guān)閉cURL資源,并且釋放系統(tǒng)資源
 curl_close($ch); 
?>

Preparation for using cURL

Open php.ini

Query curl Is the module turned on?

QQ截圖20161105154726.png

If there is no ; sign in front, you only need to remove and save it.

Continuing Learning
||
<?php //1.初始化,創(chuàng)建一個新cURL資源 $ch = curl_init(); //2.設(shè)置URL和相應(yīng)的選項 curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); //3.抓取URL并把它傳遞給瀏覽器 curl_exec($ch); //4.關(guān)閉cURL資源,并且釋放系統(tǒng)資源 curl_close($ch); ?>
submitReset Code