osamc.de/protokolle.php

29 lines
670 B
PHP
Raw Normal View History

2023-10-17 18:09:30 +02:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<pre> <!-- Keep pure text line breaks -->
<?php
//see https://github.com/vstelmakh/url-highlight
require '/home/meeehgru/vendor/autoload.php'; //relative path with DIR . concat does not work
use VStelmakh\UrlHighlight\UrlHighlight;
$urlHighlight = new UrlHighlight();
$files = glob("./protokolle/osamc_*.txt");
foreach(array_reverse($files) as $file){
$path_parts = pathinfo($file);
echo "<h2>" . $path_parts['filename'] . "</h2>";
echo "\n";
echo $urlHighlight->highlightUrls(file_get_contents($file));
echo "\n";
}
fclose($out);
?>
</pre>
</body>
</html>