Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created June 6, 2012 12:25
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 VantivSDK/2881564 to your computer and use it in GitHub Desktop.
Save VantivSDK/2881564 to your computer and use it in GitHub Desktop.
PHP Script to test connectivity to Litle's certification environment
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_PROXY, NULL);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml'));
curl_setopt($ch, CURLOPT_URL, 'https://cert.litle.com/vap/communicator/online');
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);
curl_setopt($ch,CURLOPT_TIMEOUT,'5');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
print("\n\nThe output of the test is :" . $output . ":");
$passed = (bool)$output;
if($passed)
print("\n\nThis request is considered to have passed");
else
print("\n\nThis request is considered to have failed");
print("\n\n");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment