signature.php 663 B

123456789101112131415161718192021222324252627
  1. <?php
  2. //Log::record("This is signatrue file.");
  3. //
  4. //$signature = $_GET["signature"];
  5. //$timestamp = $_GET["timestamp"];
  6. //$nonce = $_GET["nonce"];
  7. //$echostr = $_GET["echostr"];
  8. $data = json_encode($_POST);
  9. $sign = $_SERVER['HTTP_SIGN'];
  10. Log::record("signature data : {$data}",Log::DEBUG);
  11. Log::record("HTTP_SIGN : {$sign}",Log::DEBUG);
  12. echo ('SUCCESS');
  13. //echo("{$echostr}");
  14. //
  15. //$token = 'stanleykinghelloworld';
  16. //$tmpArr = [$token, $timestamp, $nonce];
  17. //sort($tmpArr, SORT_STRING);
  18. //$tmpStr = implode( $tmpArr );
  19. //$tmpStr = sha1( $tmpStr );
  20. //
  21. //if( $tmpStr == $signature ){
  22. // return true;
  23. //}else{
  24. // return false;
  25. //}