<% user = Request("user") countype= Request("countype") Set file = CreateObject("Scripting.FileSystemObject") Application.lock filepath=Server.MapPath("regdata/"&user&".asp") Set Readfile = file.OpenTextFile(filepath) for i = 0 to 6 Redim preserve Temp(i) Temp(i)=Readfile.ReadLine Next Readfile.close Set Writefile = file.CreateTextFile(filepath,true) if request("re") = "" then temp(3)=temp(3)+1 end if for i = 0 to 6 Writefile.WriteLine Temp(i) Next Writefile.close Application.unlock sum = temp(3) If len(sum) <= 5 then a = 5 Else a = 8 End if For i = 1 to a - len(sum) sum="0"&sum Next SERVE = Request.ServerVariables("SERVER_NAME") url = Request.ServerVariables("URL") URL=REPLACE(URL,"counter.asp","") For i = 1 to len(sum) pic= Mid(sum,i,1) &".gif" pic="HTTP://"&SERVE&url&countype&"/"&pic %> document.write('') <% next %>