> 3) % 51))."%, "; $css .= (50 + (($number >> 5) % 51))."%);"; return $css; } //header("refresh: 28"); header("Cache-Control: no-cache, no-store, must-revalidate"); if (!is_dir("data")) { // initialize everything mkdir("data", 0755); file_put_contents("data/sentences.txt", "\n"); file_put_contents("data/archive-links.txt", "\n"); file_put_contents("data/config.json", "{\n\n}\n"); print("

Data directory automatically initialized

"); } if (array_key_exists("submitted", $_REQUEST)) { $word = urldecode($_REQUEST["submitted"]); //print("Jemand schreibt ".$word."
"); $sentences = fopen("./data/sentences.txt", "a") or die("unable to open sentences file"); $content = ""; $ends_of_sentence = ['.', '!', '?']; if (preg_match("/\p{L}/", $word[0])) { // check if first character is letter (including ä, ê, ß stuff) $content .= " "; } $content .= htmlentities($word); $content .= ""; if (in_array($word[-1], $ends_of_sentence)) { $content .= "
\n"; } if (!empty($word)) { fwrite($sentences, $content); } fclose($sentences); header("location: ".htmlentities($_SERVER['PHP_SELF'])); } $raw_json_config = file_get_contents("data/config.json"); $config_data = json_decode($raw_json_config, false); ?> <?php print($config_data->title ?? "One Word Each"); ?> send_logo)) { print(""); } ?> " type="image/x-icon"> style)) { print(""); } ?>
" width="90%">

headline ?? "One Word Each Seite"); ?>