PHP code example of hercules / alist-url-signer

1. Go to this page and download the library: Download hercules/alist-url-signer 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/ */

    

hercules / alist-url-signer example snippets


define('TOKEN', '管理=>设置=>其他 令牌 的值');
define('HOST', '域名');

use Hercules\AlistURLSigner\Signer;
$signer = new Signer(HOST, TOKEN, true, 0);
echo $signer->sign('/your-filename');