12345678910111213141516171819202122 |
- <?php
- Log::record("This is signatrue file.");
- $signature = $_GET["signature"];
- $timestamp = $_GET["timestamp"];
- $nonce = $_GET["nonce"];
- $echostr = $_GET["echostr"];
- echo("{$echostr}");
- $token = 'stanleykinghelloworld';
- $tmpArr = [$token, $timestamp, $nonce];
- sort($tmpArr, SORT_STRING);
- $tmpStr = implode( $tmpArr );
- $tmpStr = sha1( $tmpStr );
- if( $tmpStr == $signature ){
- return true;
- }else{
- return false;
- }
|