Supported Versions: PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8
Close a cURL session
<?php curl_close(CurlHandle $handle): void
<?php if (isset($this->jobs[$id], $this->jobs[$id]['curlHandle'])) {
$job = $this->jobs[$id];
curl_multi_remove_handle($this->multiHandle, $job['curlHandle']);
curl_close($job['curlHandle']);
if (is_resource($job['headerHandle'])) {
fclose($job['headerHandle']);
}
<?php $error = curl_error($curlHandle);
$errno = curl_errno($curlHandle);
curl_multi_remove_handle($this->multiHandle, $curlHandle);
curl_close($curlHandle);
$headers = null;
$statusCode = null;
<?php $ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
fclose($fp);
}
<?php $ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
fclose($fp);
}
<?php $ch = curl_init($url);
curl_setopt_array($ch, $options);
curl_exec($ch);
curl_close($ch);
fclose($fp);
}
<?php private function closeCurlHandleNext(): void
{
if ($this->curlHandleNext !== null) {
curl_close($this->curlHandleNext);
$this->curlHandleNext = null;
}
}
<?php private function closeCurlHandleResult(): void
{
if ($this->curlHandleResult !== null) {
curl_close($this->curlHandleResult);
$this->curlHandleResult = null;
}
}