Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

download counter ???!!!

Status
Not open for further replies.

msir

IS-IT--Management
Jul 10, 2001
19
CZ
I would like to create download counter of my programms or files. I want to have in the text: # vistors downloaded this file. Can you help me? Thanks.
 
Have the download link be an ASP Page that records the download in a database and then kicks the download off for the user. Alternately you could use a program like WebTrends to monitor that sort of activity on your site. Wushutwist
 
The other alternative(s) you have are this.

You can increment an application variable each time a user hits your site. This is the easiest way, but you restart your count each time your webserver is restarted.

ex:
in your global.asa
sub application_onstart()
Application("webcount") = 0
end sub

Application.Lock
Application("webcount") = Application("webcount") + 1
Application.Unlock

Response.write Application("webcount") & " people have visited"

Your second option is to write to a txt file, and just increment that each time. Check faq333-504 for more info

you can always go the DB route to... it's all up to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top