Skip to content

Instantly share code, notes, and snippets.

@olivierbellone
Created September 28, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olivierbellone/959ccd8e4687d2e21b479b0159c1b425 to your computer and use it in GitHub Desktop.
Save olivierbellone/959ccd8e4687d2e21b479b0159c1b425 to your computer and use it in GitHub Desktop.
<?php
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://api.stripe.com/healthcheck");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$rbody = curl_exec($c);
if ($rbody === false) {
$errno = curl_errno($c);
$msg = curl_error($c);
curl_close($c);
echo "Error! errno = " . $errno . ", msg = " . $msg;
} else {
curl_close($c);
echo "Success! response = " . $rbody;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment