I have a BIG problem I have to solve if any of you know ASP.
I have a script that reads from a text document and shows whats it there on my page.
I use the code for a chat box on my webpage, here is the address
Http://24.29.2.138/new/index.asp
here is the code the reads the docunent...
<%
whichfile=server.mappath("messages.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(whichfile, 1, False)
counter=0
do while not thisfile.AtEndOfStream
counter=counter+1
thisline=thisfile.readline
response.write thisline & "<br>"
loop
thisfile.Close
set thisfile=nothing
set fs=nothing
%>
Here is a sample of the text in the Document it reads from
<b>jaimz :: 01.03.01</b><br>-test1<p>
<b>jaimz :: 01.03.01</b><br>-it could use a little bit more work, but it\'s getting there<p>
<b>Name :: 01.03.01</b><br>-Message<p>
<b>JAimZ :: 01.03.01</b><br>-Maybe I should add time as well as the date, and a way to limit the amount of posts<p>
<b>Name :: 01.03.01</b><br>-Message<p><b>name and stuff :: 01.03.01</b><br>-message and crap<p>
<b>jaimz :: 01.04.01</b><br>-test test<p><b>Name :: 01.04.01</b><br>-Message<p>
What my problem is, i want this to only show the 8 most recent messages, what can I do?