cURL curl_close
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
curl_close — cURL 세션 닫기
설명
curl_close(CurlHandle $handle
): void
메모: 이 함수는 효과가 없습니다. PHP 8.0.0 이전에는 이 함수를 사용하여 리소스를 닫았습니다.
cURL 세션을 닫고 모든 리소스를 해제합니다. cURL 핸들인 handle
도 삭제됩니다.
매개변수
handle
- curl_init()에서 반환된 cURL 핸들입니다.
반환 값
값이 반환되지 않습니다.
변경 로그
버전 | 설명 |
---|---|
8.0.0 | handle 은 이제 CurlHandle 인스턴스를 예상합니다. 이전에는 리소스가 필요했습니다. |
Examples
예제 #1 새 cURL 세션 초기화 및 웹 페이지 가져오기
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
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);
?>
기타
- curl_init() - cURL 세션 초기화
- curl_multi_close() - cURL 핸들 세트 닫기