<?php
$employeeId = 'ANDRIY PI';
$client = 'ALASK';
$reportUrl = "https://se/ords/webdba/TMSODBC.pkg_forecast_web.prc_sum_base"
. "?p_client=$client"
// Please enter any id/key from access_key table
// select * from tms.access_key;
$privateKeyID = "key_1";
$privateKey = "dfr....h";
$stringToSign = $employeeId . $dateStr . $privateKey;
$signature = hash_hmac('sha256', $stringToSign, $privateKey);
$token = urlencode($signature . '|' . $privateKeyID . '|' . $dateStr);
//URL with token
echo $reportUrl . '&p_token=' . $token;
PD9waHAKJGVtcGxveWVlSWQgPSAnQU5EUklZIFBJJzsKJGNsaWVudCA9ICdBTEFTSyc7CiRyZXBvcnRVcmwgPSAiaHR0cHM6Ly9zZS9vcmRzL3dlYmRiYS9UTVNPREJDLnBrZ19mb3JlY2FzdF93ZWIucHJjX3N1bV9iYXNlIgoJLiAiP3BfY2xpZW50PSRjbGllbnQiCgkuICImcF91c2VyPSIgLiB1cmxlbmNvZGUoJGVtcGxveWVlSWQpOwoKCgovLyBQbGVhc2UgZW50ZXIgYW55IGlkL2tleSBmcm9tIGFjY2Vzc19rZXkgdGFibGUKLy8gc2VsZWN0ICogZnJvbSB0bXMuYWNjZXNzX2tleTsKJHByaXZhdGVLZXlJRCA9ICJrZXlfMSI7CiRwcml2YXRlS2V5ID0gImRmci4uLi5oIjsKCiRkYXRlU3RyID0gZ21kYXRlKCdZbWRIaXMnKTsKJHN0cmluZ1RvU2lnbiA9ICRlbXBsb3llZUlkIC4gJGRhdGVTdHIgLiAkcHJpdmF0ZUtleTsKJHNpZ25hdHVyZSA9IGhhc2hfaG1hYygnc2hhMjU2JywgJHN0cmluZ1RvU2lnbiwgJHByaXZhdGVLZXkpOwoKJHRva2VuID0gdXJsZW5jb2RlKCRzaWduYXR1cmUgLiAnfCcgLiAkcHJpdmF0ZUtleUlEIC4gJ3wnIC4gJGRhdGVTdHIpOwoKLy9VUkwgd2l0aCB0b2tlbgplY2hvICRyZXBvcnRVcmwgLiAnJnBfdG9rZW49JyAuICR0b2tlbjsK