fork(1) download
  1. <?php
  2. $packageName = 'pkg_forecast_web';
  3. $reportName = 'prc_sum_base';
  4. $client = 'ALAS';
  5. $reportUrl = "https://se/ords/webdba/TMSODBC.$packageName.$reportName?p_client=$client";
  6.  
  7. $employeeId = 'ANDRIY PI';
  8.  
  9. // Please enter any id/key from access_key table
  10. // select * from tms.access_key;
  11. $privateKeyID = "key_1";
  12. $privateKey = "dfr....h";
  13.  
  14. $dateStr = gmdate('YmdHis');
  15. $stringToSign = $employeeId . $dateStr . $privateKey;
  16. $signature = hash_hmac('sha256', $stringToSign, $privateKey);
  17.  
  18. $token = base64_encode($dateStr . '|' . $privateKeyID . '|' . $signature);
  19.  
  20. //SSO - report url
  21. printf('%s&p_user=%s&p_token=%s',
  22. $reportUrl, urlencode($employeeId), urlencode($token));
  23.  
Success #stdin #stdout 0.03s 25964KB
stdin
Standard input is empty
stdout
https://se/ords/webdba/TMSODBC.pkg_forecast_web.prc_sum_base?p_client=ALAS&p_user=ANDRIY+PI&p_token=MjAyNTAzMjExNTQ4MTJ8a2V5XzF8YTMyNDNlYzg1NjQ3YzMyMWVmYjFjZmYxNDBjMjgzNWRlNzJiZGJjN2NiY2NhYzk3Yjc0NGM0M2E3MWQ4NzI0Ng%3D%3D