Skip to content

Instantly share code, notes, and snippets.

@IlariExove
IlariExove / debug-curl-tls.php
Created November 25, 2016 01:18
How to debug PHP cURL SSL/TLS parameters
<?php
$ch = curl_init('https://www.google.com/');
$verbose = fopen('php://temp', 'w+');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
curl_setopt($ch, CURLOPT_STDERR, $verbose);