<%name=Trim(Request.QueryString("name")) dir=trim(request.querystring("dir")) sername=Request.ServerVariables("SERVER_NAME") scrname=Request.ServerVariables("SCRIPT_NAME") linkurl="http://" & sername & Left(scrname,(len(scrname)-9)) & "counter.asp?name=" &name dim visitors whichfile=server.mappath("regdata/counter"&name&".txt") Set fs = CreateObject("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(whichfile) visitors=thisfile.readline thisfile.close countlen=len(visitors) for i=1 to countlen pic=mid(visitors,i,1) linkurl="http://"&sername&Left(scrname,(len(scrname)-11))&dir&"/"&pic%> document.write('') <% application.lock next visitors=visitors+1 Set out=fs.CreateTextFile(whichfile) out.WriteLine(visitors) out.close set fs=nothing application.unlock %>