<font color="#FFFFFF"><b>Total Site Hits:</b> <SCRIPT type=text/vbscript> Dim fso Dim tso Dim filObject Dim VisitorCount Dim strOutputName Dim objOutputFile Set fso = CreateObject("Scripting.FileSystemObject") Set filObject = fso.GetFile("\\cci-opsweb01\TTHitCount\HitCounter.txt") Set tso = filObject.OpenAsTextStream VisitorCount = CLng(tso.ReadAll) VisitorCount = VisitorCount + 1 strOutputName = "\\cci-opsweb01\TTHitCount\HitCounter.txt" Set objOutputFile = fso.createTextFile(strOutputName,True) objOutputFile.WriteLine VisitorCount Document.Write(VisitorCount) </Script>
Quote:writes the hits to the textfile when the website is opened from the server's brower. if the website is opened on another computer, it does not write hits to the text file
Quote:"\\cci-opsweb01\TTHitCount\HitCounter.txt"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)