" . $userName . " says:
" . $_GET["userMessage"]. "
id=". $microtime . " | " . $dateToWrite . "
";
echo $messageToWrite;
//generate filename
$filename = $microtime . ".php";
$filename = "/srv/www/htdocs/chat/messages/" . $filename;
//echo $filename;
//create and write to file
$handler = fopen($filename, "w");
fwrite($handler, $messageToWrite);
fclose($handler);
chmod($filename, 0777);
header("Location: http://filip-nilsen.com/chat");
exit();
?>