PHP code example of hhun / web3-recover

1. Go to this page and download the library: Download hhun/web3-recover 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/ */

    

hhun / web3-recover example snippets

 php
use hhun\Web3Recover\Web3Recover;

$signed = '0x4cde93d4........'; // 签名内容

$msg = 'login';
echo Web3Recover::fromText($msg, $signed);

$hex = '0x6c6f67696e';
echo Web3Recover::fromHex($hex, $signed);