Add sources

This commit is contained in:
Steffen Lange 2021-03-23 22:44:03 +01:00
parent b32547eb67
commit 550846d8a3
3 changed files with 284 additions and 0 deletions

15
index.php Normal file
View file

@ -0,0 +1,15 @@
<?php
/**
* Flachwitzesammlung von Philipp Weißmann, GPL-3.0 License
* https://github.com/derphilipp/Flachwitze
*/
header('Content-Type: text/plain');
if ($s = file_get_contents(__DIR__ . '/flachwitze.txt')) {
$a = explode("\n", $s);
if (($c = count($a)) > 1)
echo $a[mt_rand(0, $c - 1)] . "\n";
}
?>