Skip to content

Instantly share code, notes, and snippets.

@mollusk
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save mollusk/1ea57b54705813b79beb to your computer and use it in GitHub Desktop.

Select an option

Save mollusk/1ea57b54705813b79beb to your computer and use it in GitHub Desktop.
$headers = array(
'Authorization: Bearer sk_test_zzz',
);
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "https://api.stripe.com/v1/customers?limit=3 -u sk_test_zzz:");
// set headers
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $output contains the output string
$output = curl_exec($ch);
print($output);
// close curl resource to free up system resources
curl_close($ch);
@serfontein
Copy link

not riaan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment