3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = "robert.shaw21@reddotnetwork.com"; $secretKey = sha1("LetMeIn2014"); $verb = "GET"; $body = json_encode("{\"Request\":{\"satn\":\"181102\"},\"emailAddress\":\"" . $username . "\"}"); $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("\n\n" . $header . "\n\n");

preferences:
35.36 ms | 402 KiB | 5 Q