3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = "robert.shaw@reddotnetwork.com"; $secretKey = sha1("LetMeIn2014"); $verb = "GET"; $body = json_encode("{\"Request\":{\"satn\":\"181102\"},\"emailAddress\":\"robert.sha.w@reddotnetwork.com\"}"); $contentmd5 = base64_encode(md5($body, true)); $contentType = "application/json"; $dateNow = gmdate("c"); $authCode = base64_encode(hash_hmac("sha1", $verb . "\n" . $contentmd5 . "\n" . $contentType . "\n" . $dateNow, $secretKey)); $header = "Content-Type: application/json" . "\n" . "Content-Length: " . strlen($body) . "\n" . "Content-MD5: " . $contentmd5 . "\n" . "Date: " . $dateNow . "\n" . "Authorization: RDN " . $username . ":" . $authCode; print($header);

preferences:
61.16 ms | 402 KiB | 5 Q