diff --git a/lib/ckratelimit.php b/lib/ckratelimit.php index ad9b21d..e8e3295 100644 --- a/lib/ckratelimit.php +++ b/lib/ckratelimit.php @@ -1,6 +1,6 @@ false,'error'=>'no «x-ratelimit-remaining» header']; if (preg_match('#^\d+$#',$aaheaders['x-ratelimit-remaining'])!==1) return ['ok'=>false,'error'=>'«x-ratelimit-remaining» header is not an integer']; $remaining=$aaheaders['x-ratelimit-remaining']+0; + if ($showrem) echo "ckratelimit: remaining: {$remaining}\n"; $date=@strtotime($aaheaders['date']); if (!is_int($date)) return ['ok'=>false,'error'=>'«date» header could not be converted to a unix timestamp']; $reset=@strtotime($aaheaders['x-ratelimit-reset']);