PHP code example of daht / request-md5-signature

1. Go to this page and download the library: Download daht/request-md5-signature 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/ */

    

daht / request-md5-signature example snippets




use Daht\RequestMd5Signature\Md5Signature;
$param = [
    "user_name"=>'daht'
];

$md5Signature= new Md5Signature('you app secret','you sign key');


//生成sign
$sign = $md5Signature->generate($param);


//验证sign
if(!$md5Signature->verify($param)){
    return $md5Signature->getErrorMessage();
}