Παράδειγμα κατάστασης αποστολών
$ApplicationUser = "Το Username μου";
$ApplicationKey = "Application Key";
$hashInBase64 = base64_encode(hash_hmac('sha256', $ApplicationUser.$timestamp.'GET',$ApplicationKey, true));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.v-track.gr/webapi_v1/json.php?f=vouchers_list");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-HASH: ' . $hashInBase64,
'X-Public: ' . $ApplicationUser,
'X-Microtime: ' . $timestamp
));
$result = curl_exec($ch);
$result = json_decode($result);
print_r($result);