Created
June 6, 2012 12:25
-
-
Save VantivSDK/2881564 to your computer and use it in GitHub Desktop.
PHP Script to test connectivity to Litle's certification environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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