<% ' VB Script to get count of visitors dim fso, textFile, iCount, strFileName Const ForReading = 1, ForWriting = 2, ForAppending = 8 set fso = Server.CreateObject("Scripting.FileSystemObject") strFileName = "d:/clients/mamulert.m6.net/mamulert.m6.net/data/counter.txt" if not fso.FileExists(strFileName) then fso.OpenTextFile strFileName, ForWriting, True iCount = 0 else Set textFile= fso.OpenTextFile(strFileName, ForReading, True) iCount = textFile.ReadLine textFile.Close end if Set textFile= fso.OpenTextFile(strFileName, ForWriting) textFile.Write iCount+1 textFile.Close iCount = FormatNumber(iCount, 0, vbFalse, vbFalse, vbTrue) %> Last Update: 3-28-2007
Visitors: <% if iCount > 0 then %> <%= iCount %> <% else %> 99,999 <% end if %>