castelodobruxo@hotmail.com
<%
Dim x, FSObject, letot, escrevetot, numacesso, acessos(), nomepag(), apagina
apagina = Request.ServerVariables("URL")
Set FSObject = CreateObject("Scripting.FileSystemObject")
nomearquivo=server.mappath("/contador/contador.txt")
Set letot = FSObject.OpenTextFile(nomearquivo,1,1)
x=0
cabaco=0
While Not letot.AtEndOfStream
ReDim preserve nomepag(x)
nomepag(x) = letot.ReadLine
If nomepag(x) = apagina Then
ReDim preserve acessos(x)
acessos(x) = letot.ReadLine + 1
contagem = acessos(x)
x = x + 1
cabaco=1
Else
ReDim preserve acessos(x)
acessos(x) = letot.ReadLine
x = x + 1
End If
Wend
letot.Close
Set letot = Nothing
Set escrevetot = FSObject.CreateTextFile(nomearquivo)
x = 0
For Each numacesso In nomepag
escrevetot.WriteLine nomepag(x)
escrevetot.WriteLine acessos(x)
x = x + 1
Next
if cabaco=0 then
contador=1
contagem=1
escrevetot.WriteLine apagina
escrevetot.WriteLine contador
end if
escrevetot.Close
Set escrevetot = Nothing
Set FSObject = Nothing
Response.Write contagem
%>