Tutorial Navigation
 

     
 Links
 

 
.

 

 Search         Date   
      

SwishMax
:  Page Hit Counter, 
April 12, 2004  -  by Pemtium  
Page hit counter for SwishMax and Swish, just need 1 line of code



























this procedure will use 1 ASP script and 1 SWF movie
The asp code is:

<%
'
http://www.globalDevelop.com
' Created by Oper

Dim objFSO, objCountFile
Dim strCountFileName    
Dim iCount              
Dim bUseImages          
Dim I                   

dim counterfiletxt
dim UpdateFlag
Dim curDir

UpdateFlag="1"
counterfiletxt="PageCounter.TXT"
curDir = Server.MapPath(counterfiletxt)
strcountfilename=curdir
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

Set objCountFile = objFSO.OpenTextFile(strCountFileName, 1, True)

If Not objCountFile.AtEndOfStream Then
   ' Set value to contents of the file
   iCount = CLng(objCountFile.ReadLine)
Else
   ' If no file exists or it's empty start at 0
   iCount = 0
End If

objCountFile.Close
Set objCountFile = Nothing
if Updateflag="1" then
   iCount = iCount + 1
end if
Set objCountFile = objFSO.CreateTextFile(strCountFileName, True)
objCountFile.WriteLine iCount
objcountFile.WriteLine "&CounterValue=" & icount
objCountFile.Close
Set objCountFile = Nothing
%>

Thank to Oper for the script.
The SWF and the ASP could be download (copy to your folder and with 1 line of code, your page hit counter will be working).

    Total Download: 65 Last Download: 8/02/2010

.

     
 Featured Links