Skip to content

Instantly share code, notes, and snippets.

@LinZap
Created December 18, 2015 09:45
Show Gist options
  • Save LinZap/c4fe75932c91b0842e0d to your computer and use it in GitHub Desktop.
Save LinZap/c4fe75932c91b0842e0d to your computer and use it in GitHub Desktop.
php 5.6.x SSL conn
<?php
$ctx = stream_context_create(['ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
]]);
$html = file_get_contents('https://google.com/', FALSE, $ctx);
$meta = stream_context_get_options($ctx)['ssl']['session_meta'];
echo $html;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment