Skip to content

Instantly share code, notes, and snippets.

@DaveRandom
Forked from anonymous/curlpost.php
Last active November 1, 2018 07:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveRandom/dd8c071a2c9f697631c4 to your computer and use it in GitHub Desktop.
Save DaveRandom/dd8c071a2c9f697631c4 to your computer and use it in GitHub Desktop.
<?php
//echo dirname(__FILE__);
$curl = curl_init('https://mydomain.com/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_CERTINFO, true);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_STDERR, fopen('php://output', 'w'));
var_dump(curl_exec($curl));
$certInfo = curl_getinfo($curl, CURLINFO_CERTINFO);
var_dump($certInfo);exit;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment