<% @Language=VBScript %> Eeshan and Rabi's Abc homepage New Page 1 <% Dim sPath, filesys, count, getValue, update, twohrs sPath=server.mappath("..\..\Uploads\ercounter.txt") Set filesys = CreateObject("Scripting.FileSystemObject") Set getValue = filesys.OpenTextFile(sPath,1,0) ' get the current value count = getValue.ReadLine If Request.Cookies("website_name")("recentvisitor") <> "yes" Then ' increment by 1 before displaying, 'cos they're a newbie count = Int(count) + 1 end if ' close file getValue.Close %> <% If Request.Cookies("website_name")("recentvisitor") <> "yes" Then ' only update the value in the text file if they're a newbie ' overwrite old text file with new one Set update = filesys.CreateTextFile(sPath) ' put new value in text file update.WriteLine(count) update.Close ' give them a cookie to make sure it doesn't count them more than once Response.Cookies("website_name")("recentvisitor") = "yes" ' make it expire in 2 hours' time twohrs = DateAdd("h", 2, Now) Response.Cookies("website_name").Expires = twohrs End If %>

Free DHTML scripts provided by
Dynamic Drive



           Updated and maintained by Julie Carillo Mahmud.                

 Visitor count  <% ' grab the length of the counter counter_length = len(count) 'loop through the hit count number by 'number and display the appropriate image 'for each numeric in the hit count for i = 1 to counter_length %><% next %>