Home  >  Article  >  Backend Development  >  Yixin php verification interface

Yixin php verification interface

WBOY
WBOYOriginal
2016-07-25 08:49:481083browse
Yixin verification interface under php
  1. $signature = $_GET['signature'];
  2. $timestamp = $_GET['timestamp'];
  3. $nonce = $_GET['nonce'];
  4. $token="1LYURrl3b89L";//Yes Change and copy to Yixin token
  5. //Combination
  6. $signatureArray = array($token, $timestamp, $nonce);
  7. //Dictionary sort
  8. sort($signatureArray);
  9. //sha1 encryption and verification
  10. if (sha1(implode($signatureArray)) == $signature){
  11. echo $_GET['echostr'];
  12. }
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn