Skip to content

Instantly share code, notes, and snippets.

@dirkeinecke
Last active June 27, 2018 10:47
Show Gist options
  • Save dirkeinecke/5b2656267524e6197606dd3752974de9 to your computer and use it in GitHub Desktop.
Save dirkeinecke/5b2656267524e6197606dd3752974de9 to your computer and use it in GitHub Desktop.
PayPal TLS Tester
<!DOCTYPE html>
<html>
<head>
<title>PayPal TLS Tester</title>
</head>
<body>
<h1>PayPal TLS Tester</h1>
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://tlstest.paypal.com/');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
echo 'Result = '.$result;
echo '<br>';
echo 'Error number = '.curl_errno($curl); // see http://php.net/manual/en/function.curl-errno.php
echo '<br>';
echo 'Error = '.curl_error($curl);
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment