易信php验证接口
时间:2021-07-01 10:21:17
帮助过:22人阅读
php下的易信验证接口
- $signature = $_GET['signature'];
- $timestamp = $_GET['timestamp'];
- $nonce = $_GET['nonce'];
- $token="1LYURrl3b89L";//可改,复制到易信token处
- //组合
- $signatureArray = array($token, $timestamp, $nonce);
- //字典排序
- sort($signatureArray);
- //sha1加密、验证
- if( sha1(implode($signatureArray)) == $signature){
- echo $_GET['echostr'];
- }
|