blob: 8cfb5b9f88521f238f2d49d3e1d176d7e62657c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>/log/txt</title>
<link href="../style.css" rel="stylesheet" type="text/css" media="all">
<?php include("../seasonal.php"); ?>
</head>
<body>
<nav><a href="../"><<<</a></nav>
<p>$ pwd</p>
<h1 class="title">/log/txt</h1>
<p>$ cat sys.log</p>
<section class="dir">
<?php
$fp = "/var/www/data/deeptwisty/sys.log";
$content = file_get_contents($fp);
$post_arr = explode("\n",$content);
$posts_out = "";
date_default_timezone_set("Etc/GMT-1");
foreach($post_arr as $p) {
if(strlen($p) > 3) {
$date = substr($p, 0, strpos($p, " "));
$sdate = date(DateTime::ATOM, $date);
$hdate = date("Y-m-d@B", $date);
$pcont = substr($p, strpos($p, " ") + 1);
$posts_out = "<article><time datetime='$sdate'>$hdate</time> >> $pcont</article>$posts_out";
}
}
echo $posts_out;
?>
</section>
<p>$</p>
</body>
</html>
|