curl_close

(PHP 4 >= 4.0.2, PHP 5, PHP 7)

curl_closecURL 세션을 닫음

설명

void curl_close ( resource $ch )

cURL 세션을 닫고 모든 리소스를 해제합니다. cURL 핸들, ch은 제거됩니다.

인수

ch

curl_init()가 반환한 cURL 핸들입니다.

반환값

값을 반환하지 않습니다.

예제

Example #1 새로운 cURL 세션을 초기화하여 웹 페이지를 가져오는 방법

<?php
// 새로운 cURL 핸들을 생성합니다.
$ch curl_init();

// URL 과 다른 옵션들을 설정합니다.
curl_setopt($chCURLOPT_URL"http://www.example.com/");
curl_setopt($chCURLOPT_HEADER0);

// URL 으로부터 데이터를 가져옵니다.
curl_exec($ch);

// cURL 세션을 닫고 리소스를 제거합니다.
curl_close($ch);
?>

참고

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top