asp chat program
OK, i'm writing a asp chat thingy.
I started last weak and just really quickly threw something together.
At the moment it counts the users online and shows a list of names at the top of the page.
It allows you to select a handle and it stores that handle in a cookie.
when you submit a message it puts the message and the handle of the poster into a application variable
--> now for the interesting part, becasue I dont knwoe what the best way is to do this, but this is what I came up with <----
I have a string I call the splitter;)
splitter = "-//|^|\\-" and I put all the messages followed by the handle of the poster into one app var.
when I want to get them out again I just use split() to put everything into a array and there we go.
So now I'm wondering about a lot of stuff.
1. how would you guys handle the messages and handles?... differently than I did (with the splitter)?
2. how would you let people open their own private chat rooms and how would you let someone send a message to another user so that only that person can see it.
I'm not currently using a DB and I want to get as far as possible without one, since I'm hosting this on buddies works server:p I'll get my own space sometime... later... whenever...;) blah
anyway. For the moment I would just like to chat about different ways of doing the above. All ides welcome. I'm shure there are numerous ways of doing this!
I did it the same way, only not with a splitter...
It looks something like:
str = Replace(str,"/me", "")
ReplMe = str
str = Replace(str,"<","<")
str = Replace(str,">",">")
StripHTML = str
If Trim(Request.Form("say")) <> "" Then
If InStr(Request.Form("say"),"/me") Then
Application("conversation") = "<span style=""color: " & Session("color") & ";font-style: italic"">" & _
Session("name") & "" & _
StripHTML(ReplMe(Request.Form("say"))) & "</span><br />" & vbNewLine & _
Application("conversation") = "<span style=""color: " & Session("color") & """><b>" & _
Session("name") & ": </b></span>" & _
StripHTML(Request.Form("say")) & "<br />" & vbNewLine & _
Which, uh, is the exact code :D
My chat is a frame page...