Skip to content

Instantly share code, notes, and snippets.

@CrBoy
Created November 29, 2014 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrBoy/ed788c724ec86881f97d to your computer and use it in GitHub Desktop.
Save CrBoy/ed788c724ec86881f97d to your computer and use it in GitHub Desktop.
整理資料時發現多年前跟 Ijs、雨蒼聽演講的時候為了偷偷聊天而寫的小聊天室....XD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TinyChat 簡易的網路聊天室</title>
</head>
<body onload="document.tinychat.say.focus()">
<?
$_GET['nick'] = escapeshellcmd($_GET['nick']);
$_GET['say'] = escapeshellcmd($_GET['say']);
if($_GET['say']!=""){
system('echo ['.$_GET['nick'].'] >> chat.log');
system('echo '.$_GET['say'].' >> chat.log');
system('echo \<br\> >> chat.log');
}
readfile("chat.log");
?>
<hr>
<form action="" method=GET name="tinychat">
暱稱:<input type=text name=nick value=<?echo $_GET['nick']?>><br/>
<input type=text name=say>
<input type=submit value='送出'>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment