metanohi-misc-subsites/subsites/projects/words/index.php

31 lines
803 B
PHP

<?php
//WTFPL 2.0
header('Content-type: text/plain; charset=UTF-8');
date_default_timezone_set('Europe/Copenhagen');
echo
'*****************************************************
*** THIS IS NOT A (MICRO)BLOG. **********************
*****************************************************
Sources: metanohi.org/:words/index.php *
metanohi.org/:words/upload.php *
metanohi.org/projects/various/words.tar.gz *
*****************************************************
';
$d='';for ($i=0;$i<19;$i++) $d.= '-';
$files = scandir('data');
$files = array_reverse($files);
foreach ($files as $x) {
$n = "data/$x";
if (is_file($n)) {
$f = fopen($n, 'r');
$t = fread($f, filesize($n));
fclose($f);
echo "$d\n" . date('Y.m.d H:i:s', $x+0) . "\n$d\n$t\n\n";
}
}
?>