php curl_init 與 curl_setopt函數
curl_init
( PHP 4中“ = 4.0.2 , PHP 5中)
curl_init -初始化一個捲曲會議
描述
資源curl_init ( [字串$網址=零值] )
初始化一個新的會議,並返回一個捲曲處理用於curl_setopt ( ) , curl_exec ( ) ,和curl_close ( )函數。
參數
網址
如果提供, CURLOPT_URL選項將被設定為它的價值。您可以手動設定使用curl_setopt ( )函數。
傳回值
返回一個捲曲處理的成功,虛假的錯誤。
執行個體
例如# 1初始化一個新的捲曲會議和擷取一個網頁
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.111cn.cn/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
http://www.bkjia.com/PHPjc/445456.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445456.htmlTechArticlephp curl_init 與 curl_setopt函數 curl_init ( PHP 4中 = 4.0.2 , PHP 5中) curl_init -初始化一個捲曲會議 描述 資源curl_init ( [字串$網址=零值] ) 初始...