Skip to content

Instantly share code, notes, and snippets.

@ssigwart
Created March 13, 2015 00:28
Show Gist options
  • Save ssigwart/886dcb3f0718d53c516b to your computer and use it in GitHub Desktop.
Save ssigwart/886dcb3f0718d53c516b to your computer and use it in GitHub Desktop.
Simple Redline13 Test Stats API Call
<?php
define('API_ENDPOINT', 'https://www.redline13.com/Api/');
define('API_AUTH_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
// Make request
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => API_ENDPOINT . 'StatsDownloadUrls?loadTestId=123',
CURLOPT_USERAGENT => 'Redline13 API User-Agent',
CURLOPT_HTTPHEADER => array('X-Redline-Auth: ' . API_AUTH_KEY, 'Content-type: application/x-www-form-urlencoded')
));
$resp = curl_exec($ch);
curl_close($ch);
print_r($resp);
echo "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment