· 6 years ago · Mar 12, 2019, 11:20 AM
1<?php
2$postdata = file_get_contents("php://input");
3list ($method, $signature) = explode('=', $_SERVER['HTTP_X_FS_SIGNATURE'], 2);
4
5$expectedSignature = hash_hmac($method, $postdata, 'secretkey');
6if (hash_equals($expectedSignature, $signature)) {
7 // Verified
8}