Permalink
Browse files

First commit

  • Loading branch information...
0 parents commit 01fbad700e70c594fcfabfd08eb2ebefae7057b1 Chris Coyier committed Oct 2, 2010
125 README for Whispering.txt
@@ -0,0 +1,125 @@
+-----------
+Add Whispering in Chat v2, by Christian Mehler
+--------------
+
+
+Changes to chat.js:
+
+function Chat (filetxt, user) {
+file = filetxt;
+usernameid = user;
+this.init = chatInit;
+this.update = updateChat;
+this.send = sendChat;
+this.getState = getStateOfChat;
+this.trim = trimstr;
+this.getUsers = getuserlist;
+}
+
+function updateChat(){
+
+$.ajax({
+
+type: "GET",
+url: "update.php",
+data: {
+'state': state,
+'file' : file,
+'nickname': usernameid
+},
+dataType: "json",
+...
+
+function getuserlist(room, username) {
+
+roomid = room;
+usernameid = username;
+
+$.ajax({
+type: "GET",
+url: "userlist.php",
+data: {
+'room' : room,
+'username': username,
+'current' : numOfUsers
+
+},
+dataType: "json",
+cache: false,
+success: function(data) {
+
+if (numOfUsers != data.numOfUsers) {
+numOfUsers = data.numOfUsers;
+var list = "
+
+Current Chatters
+";
+for (var i = 0; i < data.userlist.length; i++) {
+list += '
+'+ data.userlist[i] +"
+";
+}
+$('#userlist').html($("
+"+ list +"
+"));
+}
+
+setTimeout('getuserlist(roomid, usernameid)', 1);
+
+},
+});
+
+}
+
+function wisper(to)
+{
+$('#sendie').val('@'+to+' '+$('#sendie').val());
+}
+
+
+
+
+
+---------
+Changes to process.php (other saving):
+---------
+
+fwrite(fopen($file, 'a'), $nickname . "~\t~" . $message = str_replace("\n", " ", $message) . "\n");
+
+
+---------
+Changes to update.php
+---------
+
+- at the beginning add
+$nickname = htmlentities(strip_tags($_GET['nickname']), ENT_QUOTES);
+
+
+-later
+...
+if ($state == $count) {
+
+$log['state'] = $state;
+$log['t'] = "continue";
+
+} else {
+
+$text= array();
+$log['state'] = $state + getlines(getfile($file)) - $state;
+
+foreach (getfile($file) as $line_num => $line) {
+if ($line_num >= $state) {
+$line = explode("~\t~", $line);
+if(substr($line[1], 0, 1)!='@')
+$text[] = ''.$line[0].''.$line[1];
+elseif($line[0]==$nickname || substr($line[1], 0, strlen('@'.$nickname))=='@'.$nickname)
+$text[] = ''.$line[0].' '.$line[1].'';
+}
+
+$log['text'] = $text;
+}
+}
+
+echo json_encode($log);
+
+?>
7 README.markdown
@@ -0,0 +1,7 @@
+A group chat room with PHP, jQuery, and Text Files.
+
+[Tutorial article for Chat v1](http://css-tricks.com/jquery-php-chat/)
+[Tutorial article for Chat v2](http://css-tricks.com/chat2/)
+
+**WARNING**: Please check out the file at /room/update.php which contained some commented code on only allowing that file to be called
+via AJAX and from a certain referrer. Without that precaution, a crafty hacker could gain access to any file on the server.
24 Setup.sql
@@ -0,0 +1,24 @@
+CREATE TABLE IF NOT EXISTS `chat_rooms` (
+ `id` tinyint(4) NOT NULL AUTO_INCREMENT,
+ `name` varchar(20) NOT NULL,
+ `numofuser` int(10) NOT NULL,
+ `file` varchar(30) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
+
+CREATE TABLE IF NOT EXISTS `chat_users` (
+ `id` tinyint(10) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) NOT NULL,
+ `status` tinyint(1) NOT NULL,
+ `time_mod` int(100) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `username` (`username`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
+
+CREATE TABLE IF NOT EXISTS `chat_users_rooms` (
+ `id` int(100) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) NOT NULL,
+ `room` varchar(100) NOT NULL,
+ `mod_time` int(40) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1472 ;
70 chatrooms.php
@@ -0,0 +1,70 @@
+<?php
+
+ session_start();
+
+ require_once("dbcon.php");
+
+ if (checkVar($_SESSION['userid'])):
+
+ $getRooms = "SELECT *
+ FROM chat_rooms";
+ $roomResults = mysql_query($getRooms);
+
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Chat Rooms</title>
+
+ <link rel="stylesheet" type="text/css" href="main.css"/>
+</head>
+
+<body>
+
+ <div id="page-wrap">
+
+ <div id="header">
+
+ <h1><a href="/examples/Chat2/">Chat v2</a></h1>
+
+ <div id="you"><span>Logged in as:</span> <?php echo $_SESSION['userid']?></div>
+
+ </div>
+
+ <div id="section">
+
+ <div id="rooms">
+ <h3>Rooms</h3>
+ <ul>
+ <?php
+ while($rooms = mysql_fetch_array($roomResults)):
+ $room = $rooms['name'];
+ $query = mysql_query("SELECT * FROM `chat_users_rooms` WHERE `room` = '$room' ") or die("Cannot find data". mysql_error());
+ $numOfUsers = mysql_num_rows($query);
+ ?>
+ <li>
+ <a href="room/?name=<?php echo $rooms['name']?>"><?php echo $rooms['name'] . "<span>Users chatting: <strong>" . $numOfUsers . "</strong></span>" ?></a>
+ </li>
+ <?php endwhile; ?>
+ </ul>
+ </div>
+ </div>
+
+ </div>
+
+</body>
+
+</html>
+
+<?php
+
+ else:
+ header('Location: http://css-tricks.com/examples/Chat2/');
+
+ endif;
+
+?>
26 check.js
@@ -0,0 +1,26 @@
+$(function() {
+
+ $("#userid").keyup(function(event) {
+
+ var username = $(this).val();
+
+ $.ajax({
+ type: "POST",
+ url: "jumpin.php",
+ data: { userid : username },
+ dataType: "json",
+ success: function(data){
+ $("#status").html(data.result);
+
+ if (data.inuse == "inuse") {
+ $("#jumpin").val("Check");
+ } else {
+ $("#jumpin").val("Go in!");
+ }
+
+ }
+ });
+
+ });
+
+});
113 dbcon.php
@@ -0,0 +1,113 @@
+<?php
+//Connection Page
+define(HOST, 'localhost');
+define(USERNAME, 'db_user');
+define(PASSWORD, 'db_password');
+
+ mysql_connect( HOST, USERNAME, PASSWORD) or die("Could not connect");
+ mysql_select_db ("chat2_db")or die('Cannot connect to the database because: ' . mysql_error());
+
+//functions
+function checkVar($var)
+{
+ $var = str_replace("\n", " ", $var);
+ $var = str_replace(" ", "", $var);
+ if(isset($var) && !empty($var) && $var != '')
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+function hasData($query)
+{ $rows = mysql_query($query)or die("somthing is wrong");
+ $results = mysql_num_rows($rows);
+ if($results == 0)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+}
+function isAjax()
+ {
+ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' )
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+
+function cleanInput($data)
+ {
+ // http://svn.bitflux.ch/repos/public/popoon/trunk/classes/externalinput.php
+ // +----------------------------------------------------------------------+
+ // | Copyright (c) 2001-2006 Bitflux GmbH |
+ // +----------------------------------------------------------------------+
+ // | Licensed under the Apache License, Version 2.0 (the "License"); |
+ // | you may not use this file except in compliance with the License. |
+ // | You may obtain a copy of the License at |
+ // | http://www.apache.org/licenses/LICENSE-2.0 |
+ // | Unless required by applicable law or agreed to in writing, software |
+ // | distributed under the License is distributed on an "AS IS" BASIS, |
+ // | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
+ // | implied. See the License for the specific language governing |
+ // | permissions and limitations under the License. |
+ // +----------------------------------------------------------------------+
+ // | Author: Christian Stocker <chregu@bitflux.ch> |
+ // +----------------------------------------------------------------------+
+ //
+ // Kohana Modifications:
+ // * Changed double quotes to single quotes, changed indenting and spacing
+ // * Removed magic_quotes stuff
+ // * Increased regex readability:
+ // * Used delimeters that aren't found in the pattern
+ // * Removed all unneeded escapes
+ // * Deleted U modifiers and swapped greediness where needed
+ // * Increased regex speed:
+ // * Made capturing parentheses non-capturing where possible
+ // * Removed parentheses where possible
+ // * Split up alternation alternatives
+ // * Made some quantifiers possessive
+
+ // Fix &entity\n;
+ $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
+ $data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
+ $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
+ $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');
+
+ // Remove any attribute starting with "on" or xmlns
+ $data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
+
+ // Remove javascript: and vbscript: protocols
+ $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data);
+ $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data);
+ $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data);
+
+ // Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
+ $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
+ $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
+ $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data);
+
+ // Remove namespaced elements (we do not need them)
+ $data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
+
+ do
+ {
+ // Remove really unwanted tags
+ $old_data = $data;
+ $data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
+ }
+ while ($old_data !== $data);
+
+ return $data;
+ }
+?>
BIN images/bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN images/logo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 index.php
@@ -0,0 +1,55 @@
+<?php
+ session_start();
+
+ if (!isset($_SESSION['userid'])):
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Chat2</title>
+
+ <link rel="stylesheet" type="text/css" href="main.css" />
+
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2" type="text/javascript"></script>
+ <script type="text/javascript" src="check.js"></script>
+</head>
+
+<body>
+
+ <div id="page-wrap">
+
+ <div id="header">
+ <h1><a href="/examples/Chat2/">Chat v2</a></h1>
+ </div>
+
+ <div id="section">
+ <form method="post" action="jumpin.php">
+ <label>Desired Username:</label>
+ <div>
+ <input type="text" id="userid" name="userid" />
+ <input type="submit" value="Check" id="jumpin" />
+ </div>
+ </form>
+ </div>
+
+ <div id="status">
+ <?php if (isset($_GET['error'])): ?>
+ <!-- Display error when returning with error URL param? -->
+ <?php endif;?>
+ </div>
+
+ </div>
+
+</body>
+
+</html>
+
+<?php
+ else:
+ require_once("chatrooms.php");
+ endif;
+?>
70 jumpin.php
@@ -0,0 +1,70 @@
+<?php
+
+ session_start();
+
+ require_once("../Chat2/dbcon.php");
+
+ if (isAjax()) {
+
+ $data = array();
+ $username = cleanInput($_POST['userid']);
+
+ if (checkVar($username)) {
+
+ $getUsers = "SELECT *
+ FROM chat_users
+ WHERE username = '$username'";
+
+ if (!hasData($getUsers)) {
+ $data['result'] = "<div class='message success'>Great! You found a username not in use</div>";
+ $data['inuse'] = "notinuse";
+ } else {
+ $data['result'] = "<div class='message warning'>That username is already in use. (Usernames take 2 minutes without use to expire)</div>";
+ $data['inuse'] = "inuse";
+ }
+
+ echo json_encode($data);
+
+ }
+
+ } else {
+
+ $username = cleanInput($_POST['userid']);
+
+ if (checkVar($username)) {
+
+ $getUsers = "SELECT *
+ FROM chat_users
+ WHERE username = '$username'";
+
+ if (!hasData($getUsers)) {
+
+ $now = time();
+
+ $postUsers = "INSERT INTO `chat_users` (
+ `id` ,
+ `username` ,
+ `status` ,
+ `time_mod`
+ )
+ VALUES (
+ NULL , '$username', '1', '$now'
+ )";
+
+ mysql_query($postUsers);
+
+ $_SESSION['userid'] = $username;
+
+ header('Location: ./chatrooms.php');
+
+ } else {
+
+ header('Location: ./?error=1');
+
+ }
+
+ }
+
+ }
+
+?>
51 main.css
@@ -0,0 +1,51 @@
+* { margin: 0; padding: 0; }
+body { font: 14px/1.4 Georgia, Serif; background: url(images/bg.jpg); color: white; }
+
+#page-wrap { margin: 0 auto; width: 600px; position: relative; }
+
+#header h1 a { display: block; width: 173px; height: 79px; background: url(images/logo.jpg) no-repeat; text-indent: -9999px; }
+
+h1,h2,h3 { margin: 0 0 20px 0; font-weight: normal; }
+h1 { font-size: 36px; }
+h2 { font-size: 30px }
+h3 { font-size: 24px }
+a:focus { outline: 0; }
+
+.message { margin: 15px 0; padding: 10px; -moz-border-radius: 20px; -webkit-border-radius: 20px; font-size: 15px; }
+.warning { background: #ffd5d5; border: 3px solid #ff3939; color: #ff3939; }
+.success { background: #e5ffdb; border: 3px solid #0dba32; color: #0dba32; }
+
+label { font-size: 20px; }
+
+#section { background: rgba(0,0,0,0.2); padding: 20px; }
+#userid { font-size: 20px; padding:8px 10px; width: 330px; }
+
+#you { position: absolute; top: 45px; right: 0; font-size: 20px; background: rgba(0,0,0,0.2); padding: 5px 10px; }
+#you span { font: italic 12px Georgia, Serif; }
+
+#rooms { }
+#rooms ul { list-style: none; }
+#rooms ul li { margin: 0 0 5px 0; }
+#rooms li a { background: rgba(0,0,0,0.2); padding: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; display: block; position: relative; }
+#rooms li a:hover { background: none; -moz-box-shadow: 0 0 5px black; -webkit-box-shadow: 0 0 5px black; }
+#rooms li a span { position: absolute; top: 3px; right: 10px; }
+#rooms li a span strong { color: white; font-size: 20px; }
+#rooms a { text-decoration: none; color: #4fb90f; font: 18px;}
+
+#chat-wrap { border: 1px solid #eee; width: 380px; float:left; }
+#chat-area { height: 300px; overflow: auto; padding: 20px; background: white; }
+#chat-area span { color: white; background: #333; padding: 4px 8px; -moz-border-radius: 5px; -webkit-border-radius: 8px; margin: 0 5px 0 0; }
+#chat-area p { padding: 8px 0; border-bottom: 1px solid #ccc; color: #333; }
+
+#name-area { top: 12px; right: 0; color: white; font: bold 12px "Lucida Grande", Sans-Serif; text-align: right; }
+#name-area span { color: #fa9f00; }
+
+#send-message-area p { float: left; color: white; padding-top: 27px; font-size: 14px; }
+
+#sendie { width: 360px; padding: 10px; margin: 5px 0 0 0; font: 12px "Lucida Grande", Sans-Serif; }
+
+#userlist { float: right; width: 160px; height: 410px; overflow-y: scroll; }
+#userlist ul { color: #fff; font-size: 18px; list-style: none; }
+#userlist ul li { }
+#userlist ul li.head { border-bottom: 1px solid #eee; }
+
136 room/chat.js
@@ -0,0 +1,136 @@
+var state;
+var mes;
+var file;
+var numOfUsers = 0;
+var roomid;
+var usernameid;
+
+function Chat (filetxt) {
+ file = filetxt;
+ this.init = chatInit;
+ this.update = updateChat;
+ this.send = sendChat;
+ this.getState = getStateOfChat;
+ this.trim = trimstr;
+ this.getUsers = getuserlist;
+}
+
+function chatInit(){
+ getStateOfChat();
+}
+
+function wait(){
+ updateChat();
+}
+
+$.ajaxSetup({
+ cache: false // for ie
+});
+
+//gets the state of the chat
+function getStateOfChat(){
+ $.ajax({
+ type: "POST",
+ url: "process.php",
+ data: {
+ 'function': 'getState',
+ 'file': file
+ },
+ dataType: "json",
+
+ success: function(data){
+ state = data.state-5;
+ updateChat();
+ },
+ });
+}
+
+//Updates the chat
+function updateChat(){
+
+ $.ajax({
+
+ type: "GET",
+ url: "update.php",
+ data: {
+ 'state': state,
+ 'file' : file
+ },
+ dataType: "json",
+ cache: false,
+ success: function(data) {
+
+ if (data.text != null) {
+ for (var i = 0; i < data.text.length; i++) {
+ $('#chat-area').append($("<p>"+ data.text[i] +"</p>"));
+ }
+
+ document.getElementById('chat-area').scrollTop = document.getElementById('chat-area').scrollHeight;
+
+ }
+
+ instanse = false;
+ state = data.state;
+ setTimeout('updateChat()', 1);
+
+ },
+ });
+}
+
+//send the message
+function sendChat(message, nickname) {
+
+ $.ajax({
+ type: "POST",
+ url: "process.php",
+ data: {
+ 'function': 'send',
+ 'message': message,
+ 'nickname': nickname,
+ 'file': file
+ },
+ dataType: "json",
+ success: function(data){
+
+ },
+ });
+
+}
+
+function trimstr(s, limit) {
+ return s.substring(0, limit);
+}
+
+function getuserlist(room, username) {
+
+ roomid = room;
+ usernameid = username;
+
+ $.ajax({
+ type: "GET",
+ url: "userlist.php",
+ data: {
+ 'room' : room,
+ 'username': username,
+ 'current' : numOfUsers
+
+ },
+ dataType: "json",
+ cache: false,
+ success: function(data) {
+
+ if (numOfUsers != data.numOfUsers) {
+ numOfUsers = data.numOfUsers;
+ var list = "<li class='head'>Current Chatters</li>";
+ for (var i = 0; i < data.userlist.length; i++) {
+ list += "<li>"+ data.userlist[i] +"</li>";
+ }
+ $('#userlist').html($("<ul>"+ list +"</ul>"));
+ }
+
+ setTimeout('getuserlist(roomid, usernameid)', 1);
+
+ },
+ });
+
+}
760 room/chatroom-css.txt
@@ -0,0 +1,760 @@
+<span>chris</span>test
+<span>chris</span>hello
+<span>Chris2</span>another
+<span>img</span>test
+<span>ewr</span>Neah
+<span>silver</span>hmm
+<span>Chris Coyier</span>Check
+<span>inspiringpixel</span>check
+<span>brdave</span>yo
+<span>Icraft</span>check
+<span>dustintheweb</span>check 1 2
+<span>hello</span>hay hay
+<span>shay</span>test
+<span>silver</span>uh oh
+<span>chris</span>check
+<span>inspiringpixel</span>looks cool
+<span>inspiringpixel</span>error one
+<span>Chris Coyier</span>Well that seems to work eh?
+<span>silver</span>I see layout breaking! <img src='smiles/sad.png'/>
+<span>hello</span>i love you
+<span>brdave</span>i luv you too
+<span>inspiringpixel</span>the username list does not set itself into auto scroll
+<span>admin</span>Look ma, I&#039;m a reserved username!
+<span>Chris Coyier</span>just the user lists gets too long too quick
+<span>O.O</span>hi <img src='smiles/smile.gif'/>
+<span>hello</span>
+<span>Test</span>Great thing
+<span>oops</span>hello there
+<span>shay</span>nice work chris
+<span>dustintheweb</span>FF 3.6 - chatters list drops out of its container
+<span>Rene</span>;)
+<span>Harry</span>don&#039;t see any problem apart from the current chatters list goes on for longer than the bounding shad
+<span>O.O</span>when the user list its to big... there is a problem <img src='smiles/smile.gif'/>
+<span>c</span>wrod
+<span>joelturner82</span>That was an effective tweet
+<span>brdave</span>very very very very very very very very very very very very very very very very very very very very
+<span>Charlie!</span>the users break the container
+<span>hello</span>ma pants are hoz
+<span>Test</span>FF 3.5 too
+<span>rich</span>the section div isn&#039;t clearing the names
+<span>art</span>yeah users break the container
+<span>Charlie!</span>i am jealous
+<span>popopo</span>jo
+<span>asdf</span>h-h-hello?
+<span>PantsOnThaFlow</span>look at me here with my pants on da flow
+<span>O.O</span>hey! people, you dont have to work? XDDDD
+<span>c</span>poop
+<span>css-tricks</span>interesting
+<span>silver</span>I&#039;m in chrome and im seeing the same thing
+<span>oops</span>im working
+<span>admin</span>yeah, the &quot;Current Chatters&quot;-Box breaks in FF3.6
+<span>c</span>penis
+<span>Charlie!</span>it looks pretty fast
+<span>shay</span>@work now
+<span>Charlie!</span>has a bunch of users
+<span>hello</span>my pen is large
+<span>popopo</span>ok
+<span>PantsOnThaFlow</span>hi Chris, works good, but I&#039;m seeing a large overflow on the &#039;Current Chatters&#039; sidebar
+<span>bingo</span>hmm, what&#039;s this for?
+<span>dustintheweb</span>no unicode support - just checked
+<span>David</span>Oooh
+<span>David</span>OoOOooOOh
+<span>admin</span>And I don&#039;t see a logout-button. And no way to get back to the Channellist - I&#039;m confused and lost!
+<span>bpartridge</span>yeah, overflow for Current Chatters is the biggest fix
+<span>inspiringpixel</span>Ok.. how does one change the rooms
+<span>popopo</span>it&#039;s for asking stupid questions
+<span>David</span>This is rad
+<span>silver</span>I wish i could make the chat window longer, it&#039;s hard to keep up with so many chaters
+<span>hello</span>bye i have to masturbate now
+<span>inspiringpixel</span>suppose I get bored in one
+<span>coyier</span>why my -ie-border-radius:5px; isn&#039;t working?
+<span>codyinman</span>is this running off php?
+<span>O.O</span>div#userlist { height::500px; overflow:auto }
+<span>Chrille</span>Hiiii
+<span>Charlie!</span>overflow: scroll?
+<span>bpartridge</span>@inspiringpixel: click &quot;Chat v2&quot;
+<span>Chrille</span>Totally
+<span>plunger</span>chatter chatter
+<span>Chrille</span>haha his is fanny
+<span>O.O</span>You people rock! XD
+<span>Chris</span>Yeah. Chatter List needs a scrollbar
+<span>super duper</span>yes
+<span>super duper</span>asdfasdfasdfas
+<span>plunger</span>plunger? what&#039;s funny about plungers?
+<span>hello</span>byeee i lov you all : )))
+<span>Charlie!</span>byeeeeeeeeeee
+<span>PantsOnThaFlow</span>so would the real CC please stand up?
+<span>super duper</span>chis is cool!
+<span>codyinman</span>current chatters does not push dark black bg down
+<span>inspiringpixel</span>cool
+<span>kiskiliskis</span>wow
+<span>shay</span>Chris, when you scroll the chat window up to read older messages it automatically drops back down on
+<span>kiskiliskis</span>good job chris
+<span>inspiringpixel</span>what else
+<span>inspiringpixel</span>ok another issue
+<span>popopo</span><a href="http://www.youtube.com/watch?v=LH5ay10RTGY" target="_blank">http://www.youtube.com/watch?v=LH5ay10RTGY</a>
+<span>thamil_pediyan</span>boo
+<span>Vernontheiii</span>Yeah i can see what shay is saying
+<span>inspiringpixel</span>wen you come back from the home page to your previous chat room
+<span>shay</span>Looks like the form eats up some characters with long messages.
+<span>inspiringpixel</span>it starts anew.. kind of irritating
+<span>iamfriendly</span>Now?
+<span>Vernontheiii</span>it should be stay where your at but notify you that more has been said
+<span>Jad</span>Hello
+<span>lee</span>all working <img src='smiles/smile.gif'/>
+<span>O.O</span>jaja the people goes in more in css chatroom
+<span>codyinman</span>everyone run FF 3.6
+<span>Chris Brame</span>Username list streches past div
+<span>iamfriendly</span>Ah there it goes! For a while there Chris, I couldn&#039;t send messages <img src='smiles/smile.gif'/>
+<span>PantsOnThaFlow</span>i&#039;m on 3.6 fo sho, and my pants are on da flo
+<span>Chris Coyier</span>reload for scrollable chatter list
+<span>O.O</span>FF 3.6 on Vista
+<span>O.O</span>all ok.
+<span>thatryan</span>lol yeah chatters list is overflowing
+<span>PantsOnThaFlow</span>ff3.6 on winXP
+<span>asdf</span>Scrollable works now
+<span>iamfriendly</span>wasn&#039;t getting any error messages, so can&#039;t offer any advice as to why, I&#039;m afraid ]
+<span>thatryan</span>actually just tweeted you a pic of it chris
+<span>robby</span>test
+<span>Chris Brame</span>ah worked great thanks chris
+<span>codyinman</span>good to see so many FF 3.6
+<span>Chris Brame</span>looks wonderful
+<span>PantsOnThaFlow</span>xp4lyfe
+<span>kiskiliskis</span>not scrollable yet
+<span>Tu pap&Atilde;&iexcl;</span>this is great
+<span>genshiken</span>errm
+<span>DanC</span>&#039;elo
+<span>Adam</span>Hello?
+<span>Poop-Nugget</span>looks like a chat room
+<span>O.O</span>TinyChat u_u
+<span>Drawar</span>This tickles my pooter.
+<span>Chris Brame</span>Love it
+<span>asdf</span>I disliked the way you choose a username, the &quot;Go In!&quot; and &quot;Check&quot; were just awkward.
+<span>test</span>fdaf a
+<span>Chris Brame</span>I want it
+<span>test</span>ds a
+<span>test</span>s a
+<span>asdf</span>And Character Limit?
+<span>asdf</span>Come on...
+<span>codyinman</span>good work CC. always impressed with your pet projects
+<span>PantsOnThaFlow</span>nice, F5 kept the past 5-10 entries
+<span>thatryan</span>no flood <img src='smiles/smile.gif'/>
+<span>test</span>The background doesnt extend all the way down for me
+<span>popopo</span>Current Chatters should be above the that scrolls...
+<span>ammonkc</span>This is nice
+<span>iamfriendly</span>Great stuff, Chris, as always
+<span>popopo</span>ABOVE THE DIV
+<span>PantsOnThaFlow</span>alpha the user list
+<span>ZephNor</span>Hm nice chat room <img src='smiles/bigsmile.png'/>
+<span>Drawar</span>Pants on the ground, pants on the ground, lookin like a fool witcha pants on da ground.
+<span>hey</span>testtesttest
+<span>Chris Coyier</span>It&#039;s not very full featured.... you can&#039;t log out, you can&#039;t kick people out...
+<span>Chris Brame</span>love the smiles <img src='smiles/smile.gif'/>
+<span>Chris Coyier</span>but whatever, it&#039;s pretty cool I think
+<span>kiskiliskis</span>wew
+<span>bob</span>I am bob!
+<span>kiskiliskis</span>i cant logout
+<span>thatryan</span>whoa
+<span>kiskiliskis</span>no session?
+<span>PantsOnThaFlow</span>/me is looking like a fool
+<span>Yo</span>Chris?
+<span>alberto</span><img src='smiles/smile.gif'/>
+<span>inspiringpixel</span>@chris coyier.. we can live with tht
+<span>hey</span>what is this written in, chris?
+<span>alberto</span><img src='smiles/sad.png'/>
+<span>test1</span>Chris, in chrome the background wasnt extending all the way for me
+<span>test1</span>fyi
+<span>thatryan</span>whole user list went blank then reappeared ;)
+<span>Yo</span>It doesn&#039;t seem to work on Firefox 3.6
+<span>Chris Coyier</span>it&#039;s jquery/php
+<span>ZephNor</span>suppose we&#039;ll just have to close the window &gt;.&lt;
+<span>scatheza</span>awesome, great work Chris <img src='smiles/smile.gif'/>
+<span>ammonkc</span>it looks good in safari
+<span>Drawar</span>Chris, it&#039;s Friday, stop coding up stuff. Let&#039;s get some shots.
+<span>davidlink</span>Awwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
+<span>alberto</span>&#039;&#039;&#039; &quot; &#039;&#039; &#039;&quot;&quot;&quot; encoding test
+<span>Yo</span>Well, it works but you can&#039;t see what is being typed
+<span>hey</span>good job. peace!
+<span>Chris Coyier</span>text is kept in chat files, usernames use a database
+<span>asdfasdf</span>asdfasdf
+<span>Tu pap&Atilde;&iexcl;</span>no accent characters &Atilde;&iexcl;&Atilde;&copy;&Atilde;&shy;&Atilde;&sup3;&Atilde;&plusmn; ??
+<span>inspiringpixel</span>looks like the entire community is here
+<span>PantsOnThaFlow</span>whoa, nowrap ftl, lol
+<span>Poney</span>Looks cool on Chrome for Mac. should fix the overflow-x
+<span>inspiringpixel</span>this is fun
+<span>popopo</span>@davidlink nice one <img src='smiles/bigsmile.png'/>
+<span>dmk</span><img src='smiles/bigsmile.png'/>
+<span>Chris Brame</span>Make it a SC so I can watch it tonight <img src='smiles/smile.gif'/>
+<span>NIGGER</span>HAI GUYS!!
+<span>POPE</span>BUSTED
+<span>hey</span>yikes.
+<span>thatryan</span>wow really
+<span>POPE</span>ALL OF YOU
+<span>POPE</span>BACK TO WORK
+<span>inspiringpixel</span>maybe chris can setuo these chatrooms every friday night and then people come and discuss stuff
+<span>Drawar</span>INSERT INTO database (users) VALUES (&quot;i am hacking your ish&quot;);
+<span>dmk</span>alert(&#039;ahhh!&#039;)
+<span>dmk</span><img src='smiles/bigsmile.png'/>
+<span>hey</span><img src='smiles/sad.png'/>
+<span>Yo</span><img src='smiles/bigsmile.png'/>
+<span>Yo</span><img src='smiles/smile.gif'/>
+<span>hey</span>emoticons!
+<span>inspiringpixel</span><img src='smiles/smile.gif'/>
+<span>Chris Brame</span>smiles aren&#039;t transparent?
+<span>Drawar</span>;-)
+<span>Yo</span>;)
+<span>roland</span>:-P
+<span>thatryan</span>no winky face
+<span>Chris Coyier</span>indeed, there are some smilies
+<span>PantsOnThaGround</span>mybaloneyhasafirstname
+<span>Drawar</span>no wink?
+<span>hey</span>B-P
+<span>inspiringpixel</span>Sweer emoticons... but the transparency .. Ouch!
+<span>Drawar</span>NO WINK?
+<span>Tu pap&Atilde;&iexcl;</span><img src='smiles/sad.png'/>
+<span>davidlink</span>WEE!
+<span>PantsOnThaGround</span><img src='smiles/bigsmile.png'/>
+<span>NIGGER</span>ARABS OUT!!
+<span>POPE</span>DIDN&#039;T I SAY GET BACK TO WORK?
+<span>roland</span>B-)
+<span>gb</span>where am i?
+<span>Chris Brame</span>whoa really
+<span>POPE</span>you&#039;re all fired.
+<span>kiskiliskis</span>COOL
+<span>PantsOnThaGround</span>/me banuser
+<span>mauditcrousse</span>cocorico !
+<span>David</span>Hello?
+<span>David</span>is you I&#039;m looking for?
+<span>POPE</span>Hi dave.
+<span>kiskiliskis</span>html tags are stripped. nice/
+<span>David</span>Hey pop
+<span>roland</span>now it needs kicking/banning obnoxious users
+<span>David</span>pope
+<span>PantsOnThaGround</span>Dave&#039;s not here.
+<span>Chris Brame</span>/agree roland
+<span>Chris Coyier</span>user banning would be the #1 feature I would add
+<span>Jussi</span>testing from Finland, Hi everyone <img src='smiles/smile.gif'/>
+<span>David</span>I&#039;m here!
+<span>gb</span>i&#039;m obnoxious. normally
+<span>yo momma</span>daves not here man
+<span>Chris Brame</span>/agree CC
+<span>David</span>Yes he is
+<span>davidlink</span>FAFAFAFA
+<span>NIGGER</span>Add it then tubs
+<span>offbrand</span>looking forward to this screencast...lol
+<span>David</span>Dave is here!!
+<span>mauditcrousse</span><img src='smiles/smile.gif'/><img src='smiles/smile.gif'/><img src='smiles/smile.gif'/><img src='smiles/smile.gif'/><img src='smiles/smile.gif'/>
+<span>PantsOnThaGround</span>nah man, dave&#039;s not here
+<span>frushkum</span>hi
+<span>David</span>I changed it to David
+<span>Chris Coyier</span>which should be doable via IP
+<span>roland</span>what about a # of users in the room at the top?
+<span>mauditcrousse</span>&#039;
+<span>davidlink</span>text-decoration: blink doesn&#039;t work.
+<span>Tu pap&Atilde;&iexcl;</span>horizontal scoll?
+<span>mark</span>hi there <img src='smiles/smile.gif'/>
+<span>davidlink</span>Success.
+<span>popopo</span>&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;&Atilde;&frac14;
+<span>NIGGER</span>Anyways.. sorry about the disruption and all that. I&#039;m away. Enjoy <img src='smiles/smile.gif'/>
+<span>Bibofau</span>hi. nice colours.
+<span>David</span>
+<span>mauditcrousse</span>h&Atilde;&copy;h&Atilde;&copy;
+<span>@ronniev</span>someone probably already said this but on my Safari the blackish box not covering currnt chatter lst
+<span>frushkum</span>bye
+<span>PantsOnThaGround</span>so, about that health care...
+<span>David</span>yea
+<span>Chris&Acirc;&nbsp;Coyier</span>Yo Yo Yo where&#039;s chris gone?
+<span>roland</span>@ronniev - refresh the window
+<span>mauditcrousse</span>utf8 -&gt; iso bug &Atilde;&copy;&Atilde;&nbsp;
+<span>elightbo</span>test test
+<span>Yo</span> _..-&#039;( )`-.._ ./&#039;. &#039;||\\. (\_/)
+<span>Bibofau</span>!&quot;&Acirc;&sect;$%&amp;/()
+<span>@ronniev</span>sweet.. thanks..
+<span>bananas-are-awesome</span>weeeeeeeee!
+<span>test</span><img src='smiles/smile.gif'/>
+<span>Tu pap&Atilde;&iexcl;</span><img src='smiles/tongue.png'/>
+<span>Kostas</span>looks good Chris..
+<span>Yo</span> | |_||_ ( ) sssSSSSSs | | ||_ ( ) sSSSSSSSSSSSs
+<span>PantsOnThaGround</span>&Atilde;�,&Atilde;�
+<span>cescopag</span>Hello world!
+<span>andrew</span><img src='smiles/smile.gif'/>
+<span>bananas-are-awesome</span>by the way - bananas are awessome incase you didnt know.... <a href="http://bananasandcoffee.com" target="_blank">http://bananasandcoffee.com</a>
+<span>PantsOnThaGround</span>yeh, ascii code fail
+<span>andrew</span>@@@@@
+<span>PantsOnThaGround</span>niki brown?
+<span>PantsOnThaGround</span>the real niki brown?
+<span>andrew</span>2222@@@@&acirc;�&not;&acirc;�&not;&acirc;�&not;&acirc;�&not;&acirc;�&not;&acirc;�&not;&acirc;�&not;2
+<span>cescopag</span>test
+<span>mauditcrousse</span>could be intereting to have it rezisable
+<span>andrew</span>euro symbol not working
+<span>Yo</span>Hehe, don&#039;t be like this guy. <a href="http://i.imgur.com/zt5eI.gif" target="_blank">http://i.imgur.com/zt5eI.gif</a>
+<span>inspiringpixel</span>can we spam here?
+<span>cromox</span>hi
+<span>cescopag</span>alert(&#039;hi dudes&#039;);
+<span>andrew</span>comes out like this &acirc;�&not;&acirc;�&not;&acirc;�&not;&acirc;�&not;
+<span>PantsOnThaGround</span>so did Chris say what this is built on?
+<span>Fred</span>what kind of load is this putting on your server?
+<span>mauditcrousse</span>&Atilde;&copy;&Atilde;&copy;
+<span>andrew</span>&Acirc;&sect;&Acirc;&sect;&Acirc;&sect;&Acirc;&sect;
+<span>andrew</span>&Acirc;&plusmn;&Acirc;&plusmn;&Acirc;&plusmn;
+<span>mauditcrousse</span>ba
+<span>inspiringpixel</span>@pantsontheground Php and avascript ... i guess
+<span>andrew</span>;))
+<span>andrew</span>;)
+<span>andrew</span><img src='smiles/smile.gif'/>
+<span>rebl</span>pretty cool
+<span>test</span><img src='smiles/smile.gif'/>
+<span>andrew</span>:0)
+<span>sebnitu</span>I love lamp
+<span>test</span>;)
+<span>po</span>Sticky footer
+<span>hugsformonsters</span>HELLO IS THIS THE INTERNET?
+<span>Kostas</span>&Atilde;&iexcl;
+<span>Tu pap&Atilde;&iexcl;</span>:@
+<span>user</span>nice
+<span>inspiringpixel</span>signining off geeks! <img src='smiles/smile.gif'/> I
+<span>po</span>It does not sticky in IE
+<span>sebnitu</span>Is this real life?
+<span>user</span>wtf
+<span>PantsOnThaGround</span>Hi, I&#039;m contacting you because your uncle died. He was to inherit 300 bagillion mexican pesos.
+<span>rebl</span>WTF you using IE
+<span>PantsOnThaGround</span>Send me your first-born child, kthxbai
+<span>AgentG</span>hi
+<span>po</span>Yes
+<span>PantsOnThaGround</span>this is memorex
+<span>user</span>ok
+<span>rebl</span>Look pretty nice in Google Chrome
+<span>po</span>I am testing
+<span>mark</span>alert(&quot;xssed&quot;);
+<span>user</span>ok
+<span>mark</span>nice <img src='smiles/smile.gif'/>
+<span>howard</span>DROP TABLE members /*
+<span>PantsOnThaGround</span>lol howard <img src='smiles/tongue.png'/>
+<span>mark</span>just a textfile *g*
+<span>rebl</span>the avatars could have better backgrounds
+<span>howard</span><img src='smiles/tongue.png'/>
+<span>AgentG</span>lol
+<span>rebl</span>or better emoticons
+<span>po</span>Nice chat
+<span>po</span>it&#039;s going so fast
+<span>PantsOnThaGround</span>your mom has a nice chat
+<span>AgentG</span>it&#039;s pretty good
+<span>rebl</span>where&#039;s chris
+<span>PantsOnThaGround</span>he&#039;s got actual work to do prolly
+<span>mauditcrousse</span>a &quot;Konami Code &quot;
+<span>PantsOnThaGround</span>speaking of...
+<span>Janna</span>tes
+<span>AgentG</span>.someclass { color: #333; }
+<span>Testy McTesterson</span>horizontal scrollbars on the chatters list ...
+<span>AgentG</span>was just wondering if it did code highlighting <img src='smiles/tongue.png'/>
+<span>marcandrew</span>this is pretty cool
+<span>iowa</span>hey now
+<span>micek</span>sweet!
+<span>Mo</span>So, is this all powered without SQL?
+<span>rebl</span>it seems he made this thing from ground up using PHP and Jquery
+<span>mark</span>still usin 1.3.2
+<span>meh</span>groovey. Seems to work well!
+<span>rebl</span>Chris uses Apache with CentOS
+<span>Mo</span>I have a similar system running on one of my sites, PHPFreeChat; had a TON of bugs though, no SQL
+<span>Kostas</span>i don&#039;t think there&#039;s any sql..
+<span>rebl</span>No sign of SQL
+<span>mark</span>recommend to put the js in a closure
+<span>Chris Coyier</span>The &quot;Real me&quot; is OUT folks, thanks for testing. Behave <img src='smiles/smile.gif'/>
+<span>AgentG</span>cya
+<span>Mo</span>Sure thing. <img src='smiles/bigsmile.png'/>
+<span>Kostas</span>;)
+<span>scatheza</span>:O
+<span>micek</span><img src='smiles/tongue.png'/>
+<span>mark</span>hm
+<span>bill</span>interesting
+<span>mark</span>changed my name to hmmm on the list. lol
+<span>scatheza</span>nice scrollbar for users <img src='smiles/smile.gif'/>
+<span>rebl</span>are you going to write a tutorial on creating this chat thingy?
+<span>AgentG</span>I think he left the room
+<span>test</span>hi
+<span>rebl</span>I think he is secretly watching us
+<span>AgentG</span>haha... maybe
+<span>test</span>where is the logout button <img src='smiles/smile.gif'/>
+<span>mark</span>he can read it all later <img src='smiles/smile.gif'/>
+<span>test</span><img src='smiles/bigsmile.png'/>
+<span>AgentG</span>maybe he&#039;s just watching you ;)
+<span>test</span>i want logout <img src='smiles/tongue.png'/>
+<span>eskaybee</span>Wow, this chat is much nicer than the other
+<span>test</span>hey chris where is the logout option?
+<span>eric</span>Logout and switch chatroom would be good
+<span>&Oslash;&acute;&Oslash;&sect;&Oslash;&ordf; &Oslash;&sect;&Ugrave;�&Oslash;&sect;&Oslash;&micro;&Oslash;&macr;&Oslash;&sect;&Oslash;&plusmn;&Ugrave;&iexcl;&Ugrave;&iexcl;&Ugrave;&cent;</span>hi 2 all
+<span>berko</span>press the chat on top
+<span>berko</span>to go to another chat room
+<span>berko</span>but theres no logout button
+<span>berko</span>Chris should add like a noob chat room
+<span>berko</span>so people can help out starters
+<span>rebl</span>chats take lot of system resources though
+<span>berko</span>true
+<span>rebl</span>one of my friend uses a facebook clone script and runs similar chat
+<span>berko</span>chris should also add stuff in the text box
+<span>rebl</span>most of the bandwidth is used up in chats
+<span>Joshua</span>i&#039;ve built something similar for mobile phones <a href="http://joshuaschaible.com/betachat/" target="_blank">http://joshuaschaible.com/betachat/</a>
+<span>Andy</span>Hey everybody!
+<span>AgentG</span>is everyone here on twitter?
+<span>robbiefa</span>Hello
+<span>Joshua</span>Yo Yo Yo
+<span>Joshua</span>I am
+<span>robbiefa</span>just thought I&#039;d test this bad boy out
+<span>meh</span>For anyone who is interested I have a Things giveways happening over here.
+<span>meh</span><a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>danphilibin</span>looking good!
+<span>robbiefa</span>pretty sweet
+<span>rebl</span>hey meh, your chat is pretty cool man
+<span>there</span>hi
+<span>meh</span>For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>a</span>weee
+<span>send from firebug</span>hi
+<span>SeanHood</span>Hey!
+<span>chat.send(&#039;hi</span>hi
+<span>AgentG</span>Things is a solid product btw
+<span>Kostas</span><a href="http://css-tricks.com/examples/Chat2/room/?name=Noob%20Chat" target="_blank">http://css-tricks.com/examples/Chat2/room/?name=Noob%20Chat</a>
+<span>Joshua</span><a href="http://css-tricks.com/examples/Chat2/room/?name=Boob%20Chat" target="_blank">http://css-tricks.com/examples/Chat2/room/?name=Boob%20Chat</a>
+<span>chat.send(&#039;hi&#039;, &#039;send from firebug&#039;);</span>hi
+<span>SeanHood</span>You guys should check out <a href="http://chatrboxapp.com/" target="_blank">http://chatrboxapp.com/</a>
+<span>unmatchedstyle</span>Very clever Chris!
+<span>test</span>javascript(alert())
+<span>AgentG</span>ok I&#039;m outie
+<span>AgentG</span>ttyl
+<span>mark</span>no xss here lol
+<span>test</span>alert();
+<span>Kostas</span>users work in unofficial chatrooms, but there is no file associated to add the conversations
+<span>arne</span>sweet
+<span>Joshua</span>LATA
+<span>rebl</span>LATA? who?
+<span>rebl</span>test
+<span>foobarz</span>test test
+<span>evano</span>what is this nonsense?
+<span>Tester</span>yeez
+<span>eternicode</span>children testing the novelties of an irc-like system <img src='smiles/smile.gif'/>
+<span>Tester</span>x)
+<span>Chris Coyier</span>No security checking...
+<span>Chris Coyier</span>Of course this is not him
+<span>hmmmmm</span>wich nonsens?
+<span>hello?</span>ping
+<span>Drew</span>Child, I am
+<span>hey _chit</span>hey
+<span>elyezer</span>This chat will be always on?
+<span>hey _chit</span>great
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>An Alien</span>probably yes..
+<span>meh</span>Been using it for mo nths, great App. Worth entering if you own a Mac.
+<span>Another Alien</span>I agree Alien <img src='smiles/smile.gif'/>
+<span>-</span>Hehe.. tons of fun!
+<span>woot</span>good morning
+<span>woot</span>hi there
+<span>woot</span>hi there
+<span>Kris_H</span>Hey
+<span>Chris Brame</span>hey guys
+<span>Chris Brame</span>how r ya?
+<span>helldiver</span>woot
+<span>woot</span>yes?
+<span>woot</span>hi there
+<span>kingkool68</span>hola
+<span>poop</span>poop
+<span>kingkool68</span>poop
+<span>poop</span>noop
+<span>poop</span>peng
+<span>noop</span>poop
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>Kris_H</span>hmmmm
+<span>meh</span>sorry for my spam
+<span>meh</span>I will not spam this chat
+<span>meh</span>oops, maybe i spam
+<span>meh</span>ok, i dont
+<span>Domas</span>is it working?
+<span>bill</span>hi
+<span>Domas</span>it is working
+<span>meh</span>I think there are two people in here with my name. I didn&#039;t post of those messages
+<span>Domas</span>yeah, me too <img src='smiles/bigsmile.png'/>
+<span>Domas</span>nice smile..
+<span>Domas</span>yeah!
+<span>Domas</span>Kostas, from?
+<span>Domas</span>maybe im 3 times in here?
+<span>Domas</span>maybe 4?
+<span>God</span>I should stop messing with people..
+<span>Kostas</span>Hey Domas
+<span>Domas</span>I think so.. <img src='smiles/bigsmile.png'/>
+<span>God</span>ok
+<span>God</span>i warned you!
+<span>Domas</span>God, do you know where S evil is?
+<span>Domas</span>Devil*
+<span>God</span>nope, sorry
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>Domas</span>ah, thanks
+<span>&acirc;��</span>It stops being funny if everyone is God..
+<span>meh</span>
+<span>meh</span><img src='smiles/bigsmile.png'/> :-) <img src='smiles/smile.gif'/>
+<span>meh</span><img src='smiles/tongue.png'/>
+<span>meh</span>that is cool
+<span>A</span>It stops being funny if everyone is God..
+<span>meh</span><img src='smiles/sad.png'/>
+<span>meh</span>i love it
+<span>meh</span>Argh, go away other meh, You are irritating me now!
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>A</span>yep
+<span>&Icirc;&copy;</span>Just stop spamming.. will you?
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>v v As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>v As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>Domas</span>vvv
+<span>meh</span>As this is a pretty active forum; for those who missed it: For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>no bankick here. lol
+<span>Domas</span>/nick as
+<span>Domas</span><img src='smiles/bigsmile.png'/>
+<span>meh</span>i tried so hard. lol
+<span>Domas</span>ok, see you later God..
+<span>Domas</span>damn, no irc commands here
+<span>jordan</span>this doesn&#039;t look like a playground. <img src='smiles/tongue.png'/>
+<span>jordan</span>hmmm
+<span>eternicode</span>hmmm
+<span>mark</span>strange here
+<span>blarg</span>yes
+<span>koster</span>hello worldd
+<span>mark</span>hi koster
+<span>koster</span>soo this is the playground
+<span>mark</span>looks like
+<span>mark</span>nice chat system
+<span>koster</span>yeah.. i like it
+<span>averagejoe</span>Much better than v1
+<span>averagejoe</span>but the r still bugs in it
+<span>mark</span>which bugs?
+<span>mark</span>seems to work
+<span>koster</span>who cares
+<span>mark</span>hmmm... chris does not seem to be here
+<span>rockbot</span>hi
+<span>Josephwalker</span>hi
+<span>felipe</span>heeeyyy there!
+<span>mark</span>hello
+<span>mark</span>so quiet here
+<span>felipe</span>chris coyer is amazing
+<span>mark</span>yeah, i love his video tuts
+<span>felipe</span>when i was starting he help me a lot
+<span>mark</span>me too
+<span>mark</span>to bad hes not in here right now
+<span>rockbot</span>Logged in but is there a way to log out?
+<span>pippolo</span>yeah, no log out button
+<span>mark</span>just leave the site i guess
+<span>nicksayre</span>unless you wanted to change your name?
+<span>mark</span>is there a way to change the name here?
+<span>baz</span>:-)
+<span>nicksayre</span>that&#039;s what i&#039;m getting at. looks like you have to leave the page then login again
+<span>nicksayre</span>or capture somones nick via javascript <img src='smiles/smile.gif'/>
+<span>nicksayre</span>but hey, its version 2 and i like it <img src='smiles/smile.gif'/>
+<span>Matthew</span>oh
+<span>Matthew</span>/help
+<span>mark</span>well, i tried that too
+<span>Matthew</span><img src='smiles/smile.gif'/>
+<span>mark</span>but there seems to be no irc commands yet
+<span>baz</span>:0
+<span>mark</span>maybe in a later version?
+<span>baz</span><img src='smiles/smile.gif'/>
+<span>baz</span>8)
+<span>mark</span><a href="http://css-tricks.com/examples/Chat2/room/chatroom-css.txt" target="_blank">http://css-tricks.com/examples/Chat2/room/chatroom-css.txt</a>
+<span>Brian</span>What&#039;s the story behind this?
+<span>mark</span>dont know, just saw a tweet from chris <img src='smiles/smile.gif'/>
+<span>Zippy</span>what?
+<span>Zippy</span>;-0
+<span>Zippy</span>:-)
+<span>Zippy</span><img src='smiles/smile.gif'/>
+<span>Zippy</span>;)
+<span>Zippy</span>fsssh
+<span>Zippy</span>weak
+<span>Zippy</span>lame
+<span>Pablo</span>Hey
+<span>smasty</span>Good one...
+<span>smasty</span>hey, ca&#039;nt see my chats!
+<span>smasty</span>sloooow...
+<span>iRolfje</span>Hi
+<span>smasty</span>very slow...
+<span>iRolfje</span>Test
+<span>iRolfje</span>its not slow here
+<span>smasty</span>kinda lame
+<span>iRolfje</span>its realy fast!
+<span>iRolfje</span>1 or maby 1,9 sec before the message shows up
+<span>iRolfje</span>0 to 0,9 i mean
+<span>iRolfje</span>sometimes even faster
+<span>iRolfje</span><img src='smiles/tongue.png'/>
+<span>mark</span>i&#039;v seen over 30 ppl in here and there was no lag
+<span>marty</span>sup folks.
+<span>Bill Niel</span>*
+<span>jonathan</span>hello
+<span>jonathan</span><img src='smiles/tongue.png'/>
+<span>pixelfuture</span>interesting. I didn&#039;t know what to expect. I like the design of the app so far. pretty cool.
+<span>amberhanks</span>hello
+<span>amberhanks</span>perdy
+<span>pixelfuture</span>this is the CSS playground. Lets play
+<span>mark</span>a timestamp would be cool
+<span>lazlow</span>Hello
+<span>lazlow</span>Oooh realtime
+<span>lazlow</span>Hello World!&#039;; alert(&quot;hello world&quot;);
+<span>lazlow</span>Nice, prevents XSS
+<span>lazlow</span>hmmm... no xss here
+<span>tester</span>hi
+<span>kiskiliskis Fri Jan 22 22:56:26 2010</span>@mark: something like this?
+<span>mark</span>wow
+<span>mark</span>how did you do that?
+<span>kiskiliskis Fri Jan 22 22:57:42 2010</span>hmmmm?
+<span>kiskiliskis Fri Jan 22 22:57:50 2010</span>good question?
+<span>amberhanks</span><img src='smiles/smile.gif'/>
+<span>amberhanks</span>:*
+<span>tester</span>;)
+<span>tester</span><img src='smiles/smile.gif'/>
+<span>john</span>:-)
+<span>john</span><img src='smiles/smile.gif'/>
+<span>mark</span>;)
+<span>mark</span>;-)
+<span>chrisblackwell</span>Hello
+<span>chrisblackwell</span><img src='smiles/smile.gif'/>
+<span>chrisblackwell</span>:-)
+<span>mark</span>hi there
+<span>john</span>hi
+<span>justin</span>hey
+<span>justin</span>pretty cool simple design
+<span>justin</span>i like it
+<span>mark</span>works nice
+<span>john</span>yea
+<span>Joshua</span>Hey hey
+<span>mark</span>hi
+<span>john</span>hi
+<span>Joshua</span>Having fun?
+<span>tedrs</span>Checking it out...
+<span>miniMAC</span>ehi
+<span>miniMAC</span>nice idea and god job chris
+<span>mark</span>works nice
+<span>tedrs</span>Leaving now...
+<span>john</span>seems he&#039;s not here
+<span>ctdesign</span>very nice chris
+<span>mark</span>i like it too
+<span>miniMAC</span>but... the scroll
+<span>miniMAC</span>is possible to replace with a custom script
+<span>Muzik</span>looks nice
+<span>miniMAC</span>another request is: add icon at the left for any nickname
+<span>Muzik</span>goodbye
+<span>miniMAC</span>goodbye
+<span>kiskiliskis - Fri Jan 22 23:16:34 2010</span>and some sort of timestamp
+<span>kiskiliskis - Fri Jan 22 23:16:46 2010</span>pls
+<span>kiskiliskis</span>Fri Jan 22 23:17:46 2010 or more something like this?
+<span>kiskiliskis</span>[Fri Jan 22 23:18:23 2010]: this is looking even better.
+<span>kiskiliskis</span>[Fri Jan 22 23:18:37 2010]: yeah.
+<span>brianvanaski</span>more like 5:18PM and for older chats 1/21/10 5:23PM
+<span>kiskiliskis</span>[Fri Jan 22 23:18:43 2010]: nice.
+<span>brianvanaski</span>The date is only needed for chats that are older than a day
+<span>froggy</span>Oink!
+<span>kiskiliskis</span>well, u r right
+<span>brianvanaski</span>Nothing new, just follow Skype
+<span>kiskiliskis</span>but I guess the chatfile will be cached
+<span>brianvanaski</span>The gray around the user name may be too dark. It dominates the text just a bit ,
+<span>jlaeser</span>looks good.
+<span>john</span>looking forward to v3
+<span>kiskiliskis</span>some minor javascript issues needs to be fixed
+<span>john</span>some bbcode would be nice
+<span>a</span>ello
+<span>john</span>hi there
+<span>kiskiliskis</span>hi
+<span>wasqas</span>hey
+<span>pixelfuture</span>hello
+<span>ping</span>yo yo yo
+<span>ping</span>wassup
+<span>ping</span>rob are you on here?
+<span>rob</span>sure i am
+<span>ping</span>rob from portland?
+<span>rob</span>ah... huh?
+<span>ping</span>nm
+<span>rob</span>k, sry
+<span>kiskiliskis</span>hi there
+<span>Me</span>Hey everyone
+<span>john</span>hi
+<span>Me</span>Gotta love this site, eh?
+<span>kiskiliskis</span>sure
+<span>john</span>yeah, great
+<span>Me - signout</span>
+<span>andrewchamp</span>How&#039;s it going?
+<span>john</span>thanks, good, u?
+<span>andrewchamp</span>Very well for me. It says &quot;me&quot; on another user. Is that chris?
+<span>fuck</span>aja
+<span>john</span>dont know
+<span>fuck</span>it correct
+<span>fuck - is lame</span>
+<span>fuck</span>jajaja
+<span>fuck</span>ya all
+<span>fuck</span>lol
+<span>fuck</span><img src='smiles/bigsmile.png'/>
+<span>kennedy</span>yo
+<span>fuck is pwn3d</span>
+<span>fuck</span>what yo
+<span>fuck</span>(finger )
+<span>fuck</span>bye
+<span>fuck</span>it cool app
+<span>fuck is about to sign off</span>
+<span>fuck</span>esta tuani la aplicacion
+<span>fuck</span>me gusta solo estaba proabando no sabia que poner
+<span>fuck</span>adios
+<span>fuck</span>cya
+<span>fuck</span>como puta me des logueo
+<span>fuck</span>hasta luego
+<span>Pieter</span>oh hai!
+<span>john</span>hi there
+<span>fuck</span>fail a not see log out
+<span>fuck</span>seems to be not implemented yet
+<span>fuck</span>ok
+<span>john</span>hm
+<span>john</span>strange conversations here
+<span>jack</span>hi
+<span>dude</span>dude
+<span>pb</span>ya
+<span>atxx</span>hallo
+<span>bob</span>Today on when animals attack ...
+<span>daniel</span>testes
+<span>wickedpro</span>Testing
+<span>wickedpro</span>Seems to work pretty smooth for me
+<span>Xiris</span>Hello
+<span>wow</span>hm...
+<span>test</span>hi
+<span>tyunb</span>testies testies...1...2...3?
+<span>valleyman</span>yo, testing 123!
+<span>Julien</span>test
+<span>test</span>test
+<span>test</span>hallo
+<span>Duenorth</span>yayhooray
+<span>arn</span>hello
+<span>bmn,</span>bnmbvm,
+<span>bmn,</span>b nbmn
+<span>bmn,</span>poop
+<span>johnnypea</span>
+<span>johnnypea</span>hmmm I can send empty message when I insert the space
+<span>teomos</span>hi
+<span>axeeffect</span>wag
+<span>Bun</span>helo
+<span>sss</span>
+<span>sss</span>aaaaaaaaaaaaa
+<span>sss</span>adawdawd
+<span>sss</span>@Bun
+<span>sss</span>aawd
+<span>sss</span>
+<span>Fox</span>Badabuuummm. <img src='smiles/smile.gif'/>
+<span>matt</span>pretty cool
+<span>bbj</span>yo
+<span>bbj</span>sup??
+<span>asdf</span>super!! <img src='smiles/smile.gif'/>
+<span>jack</span>test
+<span>joe</span>hm
+<span>gert</span>test
+<span>gert</span><img src='smiles/smile.gif'/>
+<span>gert</span><img src='smiles/bigsmile.png'/>
+<span>Ding</span>blong
+<span>user</span><a href="http://css-tricks.com" target="_blank">http://css-tricks.com</a>
+<span>user</span><a href="http://css-tricks.com/%22%20onclick%3D%27javascript%3Aalert%28%22xss%22%29%3B%27" target="_blank">http://css-tricks.com/%22%20onclick%3D%27javascript%3Aalert%28%22xss%22%29%3B%27</a>
+<span>xhr</span>hi
95 room/chatroom-html.txt
@@ -0,0 +1,95 @@
+<span>chris</span>test
+<span>chris</span>hello
+<span>Chris2</span>another
+<span>art</span>testing one two three
+<span>css-tricks</span>this is kinda interesting Yup
+<span>otnemem7</span>what is this for?
+<span>juarezpaf</span>Nice!
+<span>css-tricks</span>dunno, but it generates a text file from the server
+<span>css-tricks</span>every now and then I get a delay
+<span>css-tricks</span><a href="http://css-tricks.com/examples/Chat2/room/chatroom-html.txt" target="_blank">http://css-tricks.com/examples/Chat2/room/chatroom-html.txt</a>
+<span>David</span>ALL by your self?
+<span>David</span>Great...
+<span>David</span>Now I&#039;m lonely
+<span>David</span>...
+<span>David</span>so alone
+<span>David</span>so very alone
+<span>David</span>:&#039;(
+<span>David</span>yay!
+<span>Kostas</span>testing
+<span>David</span>I&#039;m not alone anymore
+<span>user</span>;)
+<span>user</span><img src='smiles/smile.gif'/>
+<span>Kostas</span><img src='smiles/smile.gif'/>
+<span>David</span>google.com
+<span>David</span><a href="http://www.google.com" target="_blank">http://www.google.com</a>
+<span>David</span>nice!
+<span>asdfasdf</span>asdfasdf
+<span>David</span>asdf;aldsf
+<span>Kostas</span> test
+<span>Kostas</span>test
+<span>Kostas</span>blue
+<span>Kostas</span>[b]bold[/b]
+<span>test</span>yeah
+<span>test</span>works great
+<span>test</span>next post?
+<span>frog</span>ribbit
+<span>David</span>your mom goes to college!
+<span>Kostas</span>{}
+<span>Kostas</span>[
+<span>Kostas</span>[]
+<span>David</span>yes...
+<span>David</span>A little privacy please...
+<span>Kostas</span><a href="http://css-tricks.com/examples/Chat2/room/chatroom-html.txt" target="_blank">http://css-tricks.com/examples/Chat2/room/chatroom-html.txt</a>
+<span>Kostas</span>no privacy <img src='smiles/smile.gif'/>
+<span>Kostas</span>&Atilde;&copy;
+<span>&Oslash;&acute;&Oslash;&sect;&Oslash;&ordf; &Oslash;&sect;&Ugrave;�&Oslash;&sect;&Oslash;&micro;&Oslash;&macr;&Oslash;&sect;&Oslash;&plusmn;&Ugrave;&iexcl;&Ugrave;&iexcl;&Ugrave;&cent;</span>&Ugrave;�&Oslash;&plusmn;&Oslash;&shy;&Oslash;&uml;&Oslash;&sect; &Oslash;&uml;&Oslash;&sect;&Ugrave;�&Oslash;&not;&Ugrave;�&Ugrave;�&Oslash;&sup1;
+<span>meh</span>For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>GLEIS45</span>test
+<span>elyezer</span>do you use HTML5 doctype in production?
+<span>meh</span>yes, I do
+<span>meh</span>but only in the one project ATM
+<span>elyezer</span>and the new tags do you use?
+<span>elyezer</span>or only the doctype declaration?
+<span>iRolfje</span>why only use doctype if you dont use the tags?
+<span>tester</span>hi
+<span>ryansmith</span>hi
+<span>bogardus</span>Hi everyone!
+<span>wow</span>uh..
+<span>johnnypea</span>
+<span>johnnypea</span>
+<span>johnnypea</span>
+<span>johnnypea</span>
+<span>johnnypea</span>
+<span>johnnypea</span>hmmm I can send empty message when I insert the space
+<span>aaa</span>see
+<span>oio</span>qsdqsd
+<span>oio</span>&#039;\
+<span>oio</span>&#039;\\{&#039;\\
+<span>something</span>&#039; or &#039;&#039; = &#039;&#039; -- do something now?!
+<span>something</span>-78,942.74
+<span>jack</span>test
+<span>alert(&#039;xss&#039;);</span>a test
+<span>vic</span>lfdsl;sdf
+<span>vic</span>testsfgdg
+<span>vic</span>dsfg
+<span>vic</span>sdf
+<span>vic</span>sg
+<span>vic</span>dfg s
+<span>vic</span>gf
+<span>vic</span>gf s
+<span>vic</span>fd
+<span>vic</span>gf sd
+<span>vic</span>sfd
+<span>vic</span>sdf g
+<span>vic</span>fsd g
+<span>vic</span>fds
+<span>bob</span>sad
+<span>mordrin</span>test
+<span>mordrin</span><img src='smiles/smile.gif'/>
+<span>user</span>this is a test
+<span>kout</span>..
+<span>Joshua</span>Hola
+<span>Stian</span>hei
+<span>ipad</span>I retail for $499, buy me ;)
+<span>Chris</span>Oh, I plan to.
302 room/chatroom-javascript.txt
@@ -0,0 +1,302 @@
+<span>chris</span>test
+<span>chris</span>hello
+<span>Chris2</span>another
+<span>img</span>JavaScript is cool
+<span>img</span>test
+<span>img</span>wha?
+<span>img</span>123
+<span>img</span>123
+<span>img</span>aa
+<span>img</span>a
+<span>img</span>a
+<span>img</span>a
+<span> kenrick</span>umm chris
+<span> kenrick</span>couple errors in the script
+<span> kenrick</span>easy fixes <img src='smiles/tongue.png'/>
+<span> kenrick</span><img src='smiles/smile.gif'/>
+<span>george</span>lol;
+<span>ohi</span>ohai
+<span>chris</span>test
+<span>kcotter</span>this is awesome
+<span>kcotter</span>good job kenrick <img src='smiles/bigsmile.png'/>
+<span>keif</span>uh, delay?
+<span>shay</span>test
+<span>shay</span>The other chat room isn&#039;t working for me.
+<span>jABBA</span>test
+<span>NIGGER</span>I&#039;m in the jungle because it&#039;s where I belong <img src='smiles/smile.gif'/>
+<span>keif</span>this misses some of my entries...
+<span>css-tricks</span>you may want to put some filters as to what&#039;s allowed
+<span>easterisle</span>wow.
+<span>css-tricks</span>as user names
+<span>bryant</span>umm
+<span>keif</span>so the char persists, even after leaving?
+<span>keif</span>damn, nm, It&#039;s been a long time since I&#039;ve been on IRC :-D
+<span>keif</span>or an IRC like experience
+<span>NIGGER</span>Anyone know how many of them Haita i people died?
+<span>NIGGER</span>Haiti*
+<span>thatryan</span>pretty
+<span>kiskiliskis</span>cool man
+<span>thatryan</span>chris rules
+<span>David</span>This is awesome
+<span>vas</span>test
+<span>David</span>seriously?
+<span>David</span>test
+<span>CBJason</span>very nice
+<span>David</span>lol
+<span>Charlie!</span>yeah
+<span>CBJason</span>is this perl based?
+<span>NIGGER</span>this sucks do nkey dick
+<span>David</span>Ciao
+<span>NIGGER</span>Sucks more dick than Davids mummy
+<span>Chris</span>Anyone knows how he could use a non URL encoded URL? I mean theres a space in the URL?!
+<span>David</span>what?&gt;
+<span>David</span>chris
+<span>juicebomb</span>%20?
+<span>alberto</span>hello
+<span>dookie</span>i like dookie
+<span>Chris</span>Theres a space in the URL in &quot;?name=JavaScript Jungle&quot;
+<span>juicebomb</span>Must be the way your browser intrprets it
+<span>alberto</span>&quot; &#039;&#039; &Atilde;&sect;&Atilde;&sect;&Atilde;&sect;&Atilde;&sect; testing
+<span>NIGGER</span>Davids mummy sucks dick. Davids mummy sucks dick. Davids mummy sucks dick. Davids mummy sucks dick.
+<span>forbairt</span>interesting
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick. Davids mummy sucks dick. Davids mummy sucks dick. Davids mummy sucks dick.
+<span>&ETH;&raquo;&Ntilde;�&ETH;&frac12;&Ntilde;�</span>&ETH;�&Ntilde;�&ETH;&micro;&ETH;&frac14; &ETH;&iquest;&Ntilde;�&ETH;&cedil;&ETH;&sup2;&ETH;&micro;&Ntilde;�
+<span>alberto</span>character encoding problem =]
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick. Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>Davids mummy sucks dick.
+<span>NIGGER</span>lol
+<span>forbairt</span>I see new features coming soon to this test <img src='smiles/bigsmile.png'/>
+<span>rock master flex</span>ugh
+<span>CBJason</span>wow, spam chatters come quick
+<span>user</span>wicked cooooool
+<span>juicebomb</span>;)
+<span>&ETH;&raquo;&Ntilde;�&ETH;&frac12;&Ntilde;�</span>Good work, NIGGER!
+<span>juicebomb</span>;)
+<span>juicebomb</span>;)
+<span>juicebomb</span>haha
+<span>poo</span>mmm...
+<span>poo</span>can&#039;t hold it
+<span>Joshua</span>Yo yo yo!@
+<span>dmk</span>nice to meet u guys !
+<span>Joshua</span>Booooobs
+<span>dougneiner</span>hey
+<span>Joshua</span>I think i&#039;ve created something similar to this, but it was for the iphone &amp; android devices.
+<span>phynx</span>cool
+<span>jpstephens</span>hey
+<span>jpstephens</span>this is kind of cool
+<span>dougneiner</span>hey Chris
+<span>Chris Coyier</span>cheers
+<span>dougneiner</span>you develop this?
+<span>Chris Coyier</span>not really =)
+<span>dougneiner</span><img src='smiles/bigsmile.png'/>
+<span>Chris Coyier</span>=)
+<span>Chris Coyier</span><img src='smiles/smile.gif'/>
+<span>phynx</span><img src='smiles/bigsmile.png'/>
+<span>Chris Coyier</span><img src='smiles/sad.png'/>
+<span>dougneiner</span>its pretty cool
+<span>Joshua</span><img src='smiles/sad.png'/>
+<span>Chris Coyier</span>I designed it
+<span>dougneiner</span>sweet
+<span>Chris Coyier</span>and fixed up some of the code
+<span>HenkdeVries</span>It works!
+<span>dougneiner</span>nice
+<span>Chris Coyier</span>then I outsourced security to Jason L.
+<span>dougneiner</span>is it open source?
+<span>Claus Pontoppidan</span>Good evening <img src='smiles/smile.gif'/>
+<span>dougneiner</span><img src='smiles/bigsmile.png'/>
+<span>Chris Coyier</span>It will be
+<span>phynx</span>:/
+<span>Chris Coyier</span>if you teach me Git
+<span>Chris Coyier</span>ha
+<span>dougneiner</span>ah, deal
+<span>dougneiner</span>I can help with it that
+<span>Joshua</span><a href="http://joshuaschaible.com/betachat/" target="_blank">http://joshuaschaible.com/betachat/</a>
+<span>Chris Coyier</span>oh links are working
+<span>Chris Coyier</span>awesome
+<span>Joshua</span>That can be used on your iphone or android
+<span>developish</span>i like it
+<span>Chris&Acirc;&nbsp;Coyier</span>Ha Ha
+<span>Chris Coyier</span>hey that&#039;s cool Joshua
+<span>Claus Pontoppidan</span>lol, no private chat yet...? ;)
+<span>dougneiner</span>ah... I see the need for &quot;Verified Users&quot; already
+<span>Chris Coyier</span>indeed
+<span>Joshua</span>Thanks Chris
+<span>dougneiner</span>I want to verify my username as the Real Doug Neiner
+<span>Chris&Acirc;&nbsp;Coyier</span><img src='smiles/bigsmile.png'/>?
+<span>Chris Coyier</span>kicking people out would be the #1 feature I would add
+<span>Chris Coyier</span>via IP
+<span>Chris Coyier</span>which it does have
+<span>Chris Coyier</span>and log
+<span>TheRealChrisCoyier</span>Nice
+<span>TheRealChrisCoyier</span>bahahaha
+<span>TheRealChrisCoyier</span>this is Doug
+<span>test</span>Great Work Chris
+<span>Chris Coyier</span>ha
+<span>davidrojas</span>hi
+<span>Joshua</span>Yeah, I like the dark theme.
+<span>Chris Coyier</span>yeah I mean what are you gonna do
+<span>Claus Pontoppidan</span>Would the real Chris Coyier please stand up? <img src='smiles/tongue.png'/>
+<span>dougneiner</span>Oh oh, pick me
+<span>dougneiner</span>I am also the RealSteveJobs
+<span>Chris Coyier</span>having one admin be able to boot would be the ideal feature
+<span>dougneiner</span>yup
+<span>Joshua</span>I agree.
+<span>dougneiner</span>use open ID
+<span>dougneiner</span>to log in
+<span>Joshua</span>Hmmm
+<span>alienfactory</span>anyone feel like answering a nooby question about javascript
+<span>Chris Coyier</span>that&#039;d be way cool
+<span>dougneiner</span>@alien, sure
+<span>Joshua</span>That would be a good way to verify people.
+<span>kwiest</span>
+<span>Joshua</span>
+<span>Joshua</span>T
+<span>DavidR</span>Hey.
+<span>alienfactory</span>in a function () {}
+<span>Claus Pontoppidan</span>
+<span>Joshua</span>
+<span>Claus Pontoppidan</span>
+<span>Claus Pontoppidan</span>
+<span>Claus Pontoppidan</span>
+<span>jc</span>hi
+<span>alienfactory</span>oops
+<span>Joshua</span>Hmm...no symbol support.
+<span>Claus Pontoppidan</span>hi jc
+<span>scatheza</span>&acirc;�&ordm;
+<span>Joshua</span>---
+<span>Joshua</span>&lt;
+<span>Joshua</span>=
+<span>Joshua</span>3
+<span>Joshua</span>
+<span>scatheza</span>Q=(o_oQ)
+<span>sebnitu</span>Boobs
+<span>Joshua</span>( . )( . )
+<span>scatheza</span>( o Y o )
+<span>davidrojas</span>&Atilde;&plusmn;
+<span>sebnitu</span>lol
+<span>alienfactory</span>function product(a,b) { return a*b; }
+<span>davidrojas</span>wops
+<span>alienfactory</span>can you explain the (a,b) works
+<span>davidrojas</span>something wrong with utf-8, ti seems
+<span>alienfactory</span>in plain english
+<span>Joshua</span>Ahhhh.
+<span>Joshua</span>I can&#039;t make a penis out of symbols. (sigh)
+<span>DavidR</span>&gt;&lt; )))&quot;&gt;
+<span>test</span>does this work?
+<span>scatheza</span><a href="http://www.1227.com/" target="_blank">http://www.1227.com/</a>
+<span>davidrojas</span>&Atilde;&iexcl;
+<span>Joshua</span>Chris, does this refresh every second or soemthing and read from a log file?
+<span>TheRealChrisCoyier</span>@alien, they are two parameters, or options, sent to the function
+<span>asd</span>nice. just jquery?
+<span>Chris Coyier</span>@joshua basically
+<span>dougneiner</span>the a and b are just for internal use
+<span>Joshua</span>Very cool.
+<span>dougneiner</span>@alien for instance: var x = 1, y = 2;
+<span>scatheza</span>Another feature I would like to see is if you click on a users name it adds it to the text area
+<span>David</span>Chris, I totally dig this
+<span>DavidR</span>me too
+<span>dougneiner</span>functionName(x,y); // returns 2
+<span>scatheza</span>But big up
+<span>test123</span>why not use comet, aka reverse ajax=
+<span>asd</span>@scatheza yes
+<span>dougneiner</span>I wish it filled the browser screen more
+<span>test123</span>now this makes a lot of requests to the server
+<span>dougneiner</span>Testing if this breaks it: &amp;#60;/div&amp;#62;Sweet
+<span>dougneiner</span>nope, very cool
+<span>davidrojas</span>helo?
+<span>jc</span>scrolling up to see previous chats is difficult, autoscrolls to bottom when new message comes in
+<span>dougneiner</span>@jc agreed
+<span>davidrojas</span>something is broken now
+<span>xbakesx</span>&#039;single&#039; quotes
+<span>jc</span>easier with only 5 in room
+<span>Joshua</span>Yeah, not built for tons of users. But it&#039;s a great simple chat room.
+<span>xbakesx</span>pretty snazzy chris
+<span>Joshua</span>i&#039;ve built something similar for mobile phones <a href="http://joshuaschaible.com/betachat/" target="_blank">http://joshuaschaible.com/betachat/</a>
+<span>xbakesx</span>is there a log out button or do i just close the window/tab?
+<span>jc</span>yes, very nice. good work chris
+<span>Joshua</span>There should be a logout...but there isn&#039;t...
+<span>btraut</span>Is there any onclose script that does it? Or is it timeout based?
+<span>btraut</span>Doesn&#039;t look like any onclose.
+<span>Joshua</span>Cool tho!
+<span>sirgeoph</span>hey, i&#039;m testing this!
+<span>Tester</span>&gt;_&gt;
+<span>sirgeoph</span>mm, look at all this testing!
+<span>Tester</span>yeah
+<span>Tester</span>this chat is awesome
+<span>Tester</span><img src='smiles/bigsmile.png'/>
+<span>matt</span>hello
+<span>meh</span>For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>test</span>tse
+<span>Tester</span><img src='smiles/sad.png'/>
+<span>Tester</span><img src='smiles/smile.gif'/>
+<span>Tester</span><img src='smiles/bigsmile.png'/>
+<span>Tester</span>:O
+<span>asdgsadg</span>asdg
+<span>joe</span>klj
+<span>joe</span>www.espn.com
+<span>hello?</span>somebody here?
+<span>joe</span>Hi
+<span>hello?</span>hi joe
+<span>hello?</span>my name does not show up in the list
+<span>meh</span>For anyone who is interested I have a Things giveway happening over here. <a href="http://appflow.co.uk/2010/01/things-giveaway/" target="_blank">http://appflow.co.uk/2010/01/things-giveaway/</a>
+<span>meh</span>I will not spam this chat
+<span>rblalock</span>well hey this is cool
+<span>rblalock</span>what&#039;s the purpiose of it?
+<span>brussell</span>evening all
+<span>mark</span>hi there
+<span>alienfactory</span>hello
+<span>alienfactory</span>back wshen i was in here early it got pretty busy
+<span>Pablo</span>Hey
+<span>smasty</span>faster,
+<span>dj</span>hello
+<span>tester</span>hi
+<span>tester</span>hi
+<span>jack</span>hi there
+<span>Test</span>hi
+<span>Test</span>hi
+<span>Test</span>hi
+<span>ryansmith</span>hi
+<span>jack</span>hmm
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>this is a test
+<span>floodtester</span>sorry
+<span>floodtester</span>sorry chris, just checking some stuff
+<span>jack</span>that was not funny
+<span>floodtester</span>well, sorry again
+<span>jack</span>ok
+<span>dude</span>dude
+<span>paperboy</span>testing one two
+<span>wow</span>test
+<span>abhi</span>anyone there?
+<span>asbdc</span>abc
+<span>johnnypea</span>two one
+<span>johnnypea</span>
+<span>johnnypea</span>
+<span>johnnypea</span>hmmm I can send empty message when I insert the space <img src='smiles/smile.gif'/>
+<span>norbert6</span>hello
+<span>something</span>say haawt?
+<span>something</span>where&#039;s the switch room button ?
+<span>blah</span>lalala
+<span>juarezpaf</span>
+<span>juckson</span>Wow... It&#039;s cool
+<span>juckson</span>N&Atilde;&pound;o?
+<span>juckson</span>utf8&#039;s problems
+<span>chriscoyier</span>No special characters
89 room/index.php
@@ -0,0 +1,89 @@
+<?php
+
+ session_start();
+
+ if (isset($_GET['name']) && isset($_SESSION['userid'])):
+
+ require_once("../dbcon.php");
+
+ $name = cleanInput($_GET['name']);
+
+ $getRooms = "SELECT *
+ FROM chat_rooms
+ WHERE name = '$name'";
+
+ $roomResults = mysql_query($getRooms);
+
+ if (mysql_num_rows($roomResults) < 1) {
+ header("Location: ../chatrooms.php");
+ die();
+ }
+
+ while ($rooms = mysql_fetch_array($roomResults)) {
+ $file = $rooms['file'];
+ }
+
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Welcome to: <?php echo $name; ?></title>
+
+ <link rel="stylesheet" type="text/css" href="../main.css"/>
+
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
+ <script type="text/javascript" src="chat.js"></script>
+ <script type="text/javascript">
+ var chat = new Chat('<?php echo $file; ?>');
+ chat.init();
+ chat.getUsers(<?php echo "'" . $name ."','" .$_SESSION['userid'] . "'"; ?>);
+ var name = '<?php echo $_SESSION['userid'];?>';
+ </script>
+ <script type="text/javascript" src="settings.js"></script>
+
+</head>
+
+<body>
+
+ <div id="page-wrap">
+
+ <div id="header">
+
+ <h1><a href="/examples/Chat2/">Chat v2</a></h1>
+
+ <div id="you"><span>Logged in as:</span> <?php echo $_SESSION['userid']?></div>
+
+ </div>
+
+ <div id="section">
+
+ <h2><?php echo $name; ?></h2>
+
+ <div id="chat-wrap">
+ <div id="chat-area"></div>
+ </div>
+
+ <div id="userlist"></div>
+
+ <form id="send-message-area" action="">
+ <textarea id="sendie" maxlength='100'></textarea>
+ </form>
+
+ </div>
+
+ </div>
+
+</body>
+
+</html>
+
+<?php
+ else:
+ header('Location: http://css-tricks.com/examples/Chat2/');
+ endif;
+?>
44 room/process.php
@@ -0,0 +1,44 @@
+<?php
+
+ $function = htmlentities(strip_tags($_POST['function']), ENT_QUOTES);
+ $file = htmlentities(strip_tags($_POST['file']), ENT_QUOTES);
+
+ $log = array();
+
+ switch ($function) {
+
+ case ('getState'):
+
+ if (file_exists($file)) {
+ $lines = file($file);
+ }
+ $log['state'] = count($lines);
+
+ break;
+
+ case ('send'):
+
+ $nickname = htmlentities(strip_tags($_POST['nickname']), ENT_QUOTES);
+ $patterns = array("/:\)/", "/:D/", "/:p/", "/:P/", "/:\(/");
+ $replacements = array("<img src='smiles/smile.gif'/>", "<img src='smiles/bigsmile.png'/>", "<img src='smiles/tongue.png'/>", "<img src='smiles/tongue.png'/>", "<img src='smiles/sad.png'/>");
+ $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
+ $blankexp = "/^\n/";
+ $message = htmlentities(strip_tags($_POST['message']), ENT_QUOTES);
+
+ if (!preg_match($blankexp, $message)) {
+
+ if (preg_match($reg_exUrl, $message, $url)) {
+ $message = preg_replace($reg_exUrl, '<a href="'.$url[0].'" target="_blank">'.$url[0].'</a>', $message);
+ }
+ $message = preg_replace($patterns, $replacements, $message);
+
+ fwrite(fopen($file, 'a'), "<span>". $nickname . "</span>" . $message = str_replace("\n", " ", $message) . "\n");
+ }
+
+ break;
+
+ }
+
+ echo json_encode($log);
+
+?>
38 room/settings.js
@@ -0,0 +1,38 @@
+$(function() {
+
+ $("#sendie").keydown(function(event) {
+
+ var key = event.which;
+
+ // all keys including return
+ if (key >= 33) {
+
+ var maxLength = $(this).attr("maxlength");
+ var length = this.value.length;
+
+ if (length >= maxLength) {
+ event.preventDefault();
+ }
+ }
+ });
+
+ $('#sendie').keyup(function(e) {
+
+ if (e.keyCode == 13) {
+
+ var text = $(this).val();
+ var maxLength = $(this).attr("maxlength");
+ var length = text.length;
+
+ if (length <= maxLength + 1) {
+ chat.send(text, name);
+ $(this).val("");
+ } else {
+ $(this).val(text.substring(0, maxLength));
+ }
+
+ }
+
+ });
+
+});
BIN room/smiles/bigsmile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN room/smiles/sad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN room/smiles/smile.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN room/smiles/tongue.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 room/update.php
@@ -0,0 +1,69 @@
+<?php
+
+ // CONSIDER THIS SECURITY MEASURE ON WHERE THE
+ // FILE CAN ONLY BE CALLED VIA AJAX AND FROM SPECIFIC LOCATIONS
+ //
+ // if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_REFERER']!="http://your-site.com/path/to/chat.js") {
+ // die();
+ // }
+
+?>
+
+
+<?php
+
+ function getfile($f) {
+
+ if (file_exists($f)) {
+ $lines = file($f);
+ }
+
+ return $lines;
+
+ }
+
+ function getlines($fl){
+ return count($fl);
+ }
+
+ $state = htmlentities(strip_tags($_GET['state']), ENT_QUOTES);
+ $file = htmlentities(strip_tags($_GET['file']), ENT_QUOTES);
+
+ $finish = time() + 50;
+ $count = getlines(getfile($file));
+
+ while ($count <= $state) {
+
+ $now = time();
+ usleep(10000);
+
+ if ($now <= $finish) {
+ $count = getlines(getfile($file));
+ } else {
+ break;
+ }
+
+ }
+
+ if ($state == $count) {
+
+ $log['state'] = $state;
+ $log['t'] = "continue";
+
+ } else {
+
+ $text= array();
+ $log['state'] = $state + getlines(getfile($file)) - $state;
+
+ foreach (getfile($file) as $line_num => $line) {
+ if ($line_num >= $state) {
+ $text[] = $line = str_replace("\n", "", $line);
+ }
+
+ $log['text'] = $text;
+ }
+ }
+
+ echo json_encode($log);
+
+?>
82 room/userlist.php
@@ -0,0 +1,82 @@
+<?php
+/*
+Author: Kenrick Beckett
+Author URL: http://kenrickbeckett.com
+Name: Chat Engine 2.0
+
+*/
+require_once("../dbcon.php");
+
+//Start Array
+$data = array();
+// Get data to work with
+ $current = cleanInput($_GET['current']);
+ $room = cleanInput($_GET['room']);
+ $username = cleanInput($_GET['username']);
+ $now = time();
+// INSERT your data (if is not already there)
+ $findUser = "SELECT * FROM `chat_users_rooms` WHERE `username` = '$username' AND `room` ='$room' ";
+
+ if(!hasData($findUser))
+ {
+ $insertUser = "INSERT INTO `chat_users_rooms` (`id`, `username`, `room`, `mod_time`) VALUES ( NULL , '$username', '$room', '$now')";
+ mysql_query($insertUser) or die(mysql_error());
+ }
+ $findUser2 = "SELECT * FROM `chat_users` WHERE `username` = '$username'";
+ if(!hasData($findUser2))
+ {
+ $insertUser2 = "INSERT INTO `chat_users` (`id` ,`username` , `status` ,`time_mod`)
+ VALUES (NULL , '$username', '1', '$now')";
+ mysql_query($insertUser2);
+ $data['check'] = 'true';
+ }
+ $finish = time() + 7;
+ $getRoomUsers = mysql_query("SELECT * FROM `chat_users_rooms` WHERE `room` = '$room'");
+ $check = mysql_num_rows($getRoomUsers);
+
+ while(true)
+ {
+ usleep(10000);
+ mysql_query("UPDATE `chat_users` SET `time_mod` = '$now' WHERE `username` = '$username'");
+ $olduser = time() - 5;
+ $eraseuser = time() - 30;
+ mysql_query("DELETE FROM `chat_users_rooms` WHERE `mod_time` < '$olduser'");
+ mysql_query("DELETE FROM `chat_users` WHERE `time_mod` < '$eraseuser'");
+ $check = mysql_num_rows(mysql_query("SELECT * FROM `chat_users_rooms` WHERE `room` = '$room' "));
+ $now = time();
+ if($now <= $finish)
+ {
+ mysql_query("UPDATE `chat_users_rooms` SET `mod_time` = '$now' WHERE `username` = '$username' AND `room` ='$room' LIMIT 1") ;
+ if($check != $current){
+ break;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+// Get People in chat
+ if(mysql_num_rows($getRoomUsers) != $current)
+ {
+ $data['numOfUsers'] = mysql_num_rows($getRoomUsers);
+ // Get the user list (Finally!!!)
+ $data['userlist'] = array();
+ while($user = mysql_fetch_array($getRoomUsers))
+ {
+ $data['userlist'][] = $user['username'];
+ }
+ $data['userlist'] = array_reverse($data['userlist']);
+ }
+ else
+ {
+ $data['numOfUsers'] = $current;
+ while($user = mysql_fetch_array($getRoomUsers))
+ {
+ $data['userlist'][] = $user['username'];
+ }
+ $data['userlist'] = array_reverse($data['userlist']);
+ }
+ echo json_encode($data);
+
+?>

0 comments on commit 01fbad7

Please sign in to comment.