Despite being enabled in the loaded PHP.ini, file_get_contents wil not load HTTPS using PHP 8.2.0
phpinfo
OpenSSL support disabled (install ext/openssl)
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
// Syntax: sprintf($url, "PackageName", "VRM", ApiKey);
$url = sprintf($url, "VehicleAndMotHistory", $vrm, $ApiKey);
// Note your package name here. There are 5 standard packagenames. Please see your control panel > weblookup or
// contact your account manager
// Create a stream
$opts = [
'https' => [
'method' => "GET",
'header' => "Accept-language: en\r\n"//.
//"Cookie: foo=bar\r\n"
]
];
$context = stream_context_create($opts);
// Open the file using the HTTP headers set above
$vehicleData = file_get_contents(
$url,
false,
$context
);
// Make the returned JSON into an usable array:
return json_decode($vehicleData, true);
Any idea onhow to get this working on Windows...
Thanks in advance.