In the provided PHP script, what is the purpose of the "$context" variable created using "stream_context_create" and how does it interact with SSL encrypted pages?

The "$context" variable created using "stream_context_create" is used to set SSL options for secure connections. By setting the "verify_peer" and "allow_self_signed" options to false, it allows PHP to make HTTPS requests to SSL encrypted pages without verifying the SSL certificate. This can be useful when dealing with self-signed certificates or when the certificate verification process is causing issues.

$context = stream_context_create([
    'ssl' => [
        'verify_peer' => false,
        'allow_self_signed' => true
    ]
]);

$response = file_get_contents('https://example.com', false, $context);
echo $response;