xxxxxxxxxx
<?php
// Set the URL you want to make the cURL request to
$url = 'https://example.com';
// Initialize cURL session
$ch = curl_init();
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute the cURL request
$response = curl_exec($ch);
// Check for errors
if ($response === false) {
echo 'cURL error: ' . curl_error($ch);
} else {
// Process the response
echo 'Response: ' . $response;
}
// Close the cURL session
curl_close($ch);
?>
Laravel cURL error 6: Could not resolve host
xxxxxxxxxx
php artisan config:clear
May work for you, may not. There are various things that can cause this issue.