Updated “ckrl()” to “ckratelimit.php” “lib” version
This commit is contained in:
parent
50e8720adb
commit
b24ee766bd
1 changed files with 4 additions and 3 deletions
|
@ -56,8 +56,9 @@ token=as7f8a7s0d89f7as97df09a8s7d90f81jkl2h34lkj12h3jkl4
|
||||||
---
|
---
|
||||||
|
|
||||||
Then run {$SCRIPTNAME} with the path of the configuration file you have
|
Then run {$SCRIPTNAME} with the path of the configuration file you have
|
||||||
created. This will create an «index.html» file that will be ready to be put
|
created as an argument. This will create an «index.html» file in the current
|
||||||
where you want (you can also see it locally, obviously).
|
directory, that will be ready to be put where you want (you can also see it
|
||||||
|
locally, obviously).
|
||||||
|
|
||||||
[[[ OPTIONS ]]]
|
[[[ OPTIONS ]]]
|
||||||
|
|
||||||
|
@ -407,7 +408,7 @@ function eecho($text) {
|
||||||
|
|
||||||
function ckrl($headers) {
|
function ckrl($headers) {
|
||||||
$rl=ckratelimit($headers);
|
$rl=ckratelimit($headers);
|
||||||
if ($rl['ok'] && $rl['sleep']>0) {
|
if ($rl['ok'] && $rl['remaining']==0) {
|
||||||
echo "\rInfo: reached rate limit, sleeping for {$rl['sleep']} second(s)... ";
|
echo "\rInfo: reached rate limit, sleeping for {$rl['sleep']} second(s)... ";
|
||||||
sleep($rl['sleep']);
|
sleep($rl['sleep']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
Loading…
Reference in a new issue