Skip to content

Instantly share code, notes, and snippets.

@iredun
Created April 24, 2017 15:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iredun/c6a01d0565a458ab742d666749abf210 to your computer and use it in GitHub Desktop.
Save iredun/c6a01d0565a458ab742d666749abf210 to your computer and use it in GitHub Desktop.
get ssl page php func
function getSslPage($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment