- json_decode: documentation ( source)
- time: documentation ( source)
- print_r: documentation ( source)
- date: documentation ( source)
<?
$url = 'http://auctionlook-dev.azurewebsites.net/api/auctions/KY';
// Initialize the cURL session with the request URL
$session = curl_init($url);
// Tell cURL to return the request data
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// Set the HTTP request authentication headers
$headers = array(
'DecibelAppID: ' . $applicationID,
'DecibelAppKey: ' . $applicationKey,
'DecibelTimestamp: ' . date('Ymd H:i:s', time())
);
curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
// Execute cURL on the session handle
$response = curl_exec($session);
echo $response;
$convertedresponse = json_decode($response, true);
echo "---------------------------------------------------------------";
print_r($convertedresponse);
echo '<pre>'; print_r($convertedresponse); echo '</pre>';
// Close the cURL session
curl_close($session);