PHP code example of hao / algorithm
1. Go to this page and download the library: Download hao/algorithm 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/ */
hao / algorithm example snippets
$config = [
'limit' => 10, // 请求限制量
'interval' => 2000, // 请求单位时间 毫秒
];
$Counter = new \limiting\Algorithm($config);