<% 'asp counter (c)1999 by New River Consulting http://new-river.com 'querystring params: ' id 'reqd. application vars: ' [datapath] dim counter,ts,fso,count,dp dp=application("gh-data") response.expires=20 response.contentType="text/plain" counter="count_" & request.querystring("id") set fso=CreateObject("Scripting.FileSystemObject") on error resume next Application.Lock if isEmpty(application(counter)) then 'read set ts=fso.openTextFile(dp & counter) if err then application.unlock response.write "error" response.end end if application(counter)=ts.readline ts.close end if count=application(counter)+1 response.write count set ts=fso.openTextFile(dp & counter ,2,false) ts.writeLine count application(counter)=count Application.Unlock response.end %>