0 - 81.php

<!DOCTYPE html>
<html><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="refresh" content="30"><style>
<?php 
$c=file_get_contents('style.css');
if(isset($_GET['dark'])){echo str_replace('#8f8','#373',str_replace('#930','#f90',str_replace('#dfd','#020',str_replace('#000','#fff',$c)))).'nav{color:#fff}';}
else{echo $c;} ?>u b{color:#f00}</style>
<title>Keepalive tracker</title>
<nav><h2>Tor refresh uptime?</h2><b>I use an internal script to record times it could request a page over tor... to try and track tor uptime</b></nav>
<p><?php
if(isset($_GET['a'])){date_default_timezone_set('Australia/Adelaide');}
$a= explode(',',file_get_contents('a/keepalive.txt'));$b='';$c=count($a);$d=max($c-($_GET['n']??400),0);$i=($_GET['n']??400);
$last=time();$lastup=filemtime('a/keepalive.txt');
for($j=$c-2;$j>$d;$j--){
    if($last-$a[$j]>350){$b.='<u><b> LATE by '.($last-$a[$j]-350).'s - after '.abs($lastup-$a[$j]).'s</b></u>';$lastup=$a[$j];}
  $b.='<br>'.date('Y-m-d H:i:s',$a[$j]);$last=$a[$j];}
echo number_format($c).' Entries, top '.intval($_GET['n']??400).' shown:<br>'.$b;
?></p></html>