Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php //$timestamp = time()*1000; $timestamp = number_format(microtime(true) * 1000, 0, '.', ''); $query_string = 'adsNo=11357657539562496000&timestamp='.$timestamp; $secret = 'NzkfIOEAaYhAt6v9Qdsl5AnmbpDPAho8aurak0CDPquFHTz6miiiKolhKWMSvWJJ'; function signature($query_string, $secret) { return hash_hmac('sha256', $query_string, $secret); } echo "hashing the string:".PHP_EOL; echo $query_string.PHP_EOL; echo "and return:".PHP_EOL; echo signature($query_string, $secret).PHP_EOL.PHP_EOL;
Copy Clear