PHP code example of davedevelopment / stiphle
1. Go to this page and download the library: Download davedevelopment/stiphle 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/ */
davedevelopment / stiphle example snippets
php
$throttle = new Stiphle\Throttle\LeakyBucket;
$identifier = 'dave';
while(true) {
// the throttle method returns the amount of milliseconds it slept for
echo $throttle->throttle($identifier, 5, 1000);
}
# 0 0 0 0 0 200 200....