ASP Chat Box
posted by Site Editor date: Tuesday, September 19, 2006
category: ASP
Asp Chat Box s a free and easy to use chat application can be used in a simple website. This version of AspChatBox can read and write only a single file. If you can work on thi script, you may write a custom script for you.
Do not forget to read/write permission on chatlog.txt file
<html>
<head>
<title>ASP Chat Box</title>
<META http-equiv="refresh" content="5">
</head>
<body>
<%
if request.Form("func") = "Send" then
nickName = trim(request.Form("nickName"))
nickName = replace(nickName, "'", "''")
chatBox = trim(request.Form("chatBox"))
chatBox = replace(chatBox, "'", "''")
session("nickName") = nickName
Set objFlSys = Server.CreateObject("Scripting.FileSystemObject")
chatFile = Server.MapPath ("chatlog.txt")
Set objStreamOutput= objFlSys.OpenTextFile (chatFile, 8, TRUE)
ipaddr=Request.ServerVariables("REMOTE_ADDR") & " : "
objStreamOutput.Write "<b>" & nickName & "</b>:"
objStreamOutput.WriteLine chatBox & "<BR>" & vbnewline
Set objStreamOutput = Nothing
end if
Set objFlSys = Server.CreateObject("Scripting.FileSystemObject")
chatFile = Server.MapPath ("chatlog.txt")
Set objStreamInput = objFlSys.OpenTextFile (chatFile, 1, False, False)
Response.Write objStreamInput.ReadALL & "<br/>"
Set objStreamInput=Nothing
%>
<form action="aspchatbox.asp" method="post" >
<strong>Nickname :</strong> <input name="nickName" value="<%=session("nickName")%>"/><br/>
<strong>Message : </strong>
<br/><textarea cols="60" rows="4" name="chatBox"></textarea>
<input type="submit" name="func" value="Send"/>
</form>
</body>
</html>
Our free applications:
Custom Search
- ASP Chat Box
- ASPNET Web Counter Free Open Source Code
- Beginning-Ajax-and-ASPNET-35
- Working with Array Remove An Item
- How to upload images to mySQL within PHP
- Video Interview With Roman Strobl
- Custom Paging in ASP Fast And Easy
- Delete Files Online in ASP
- Displaying Records From An Excel Database
- Paging Results in PHP
- How to write and use a JavaBean My frst java bean
- Installing Sun Java System Application Server 9.1 in Solaris Zones
- Java SE 6 Performance White Paper
- Converting sceonds to hours minutes and seconds
- What is Ecommerce and the Importance of Ecommerce
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- What is Ecommerce and the Importance of Ecommerce
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- Counting records in PHP mySQL
- ActiveNews Manager Freeware News Exchange Software
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- ActiveNews Manager Freeware News Exchange Software
- Counting records in PHP mySQL
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Comparing Dates