PHP code example of themismin / laravel-sign
1. Go to this page and download the library: Download themismin/laravel-sign library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
themismin / laravel-sign example snippets
$params = $request->except(['sign']);
ksort($params);
$str = ''
foreach($params as $k => $v) {
// $v 为 array 递归拼接
$str .= $k . $v;
}
$str .= SIGN_KEY
$sign = md5($str);
if ($sign === $request->get(sign)) {
return true;
}
return false;