script for number of views

Reply

Join Date: Jun 2006
Posts: 1
Reputation: akhalfan is an unknown quantity at this point 
Solved Threads: 0
akhalfan akhalfan is offline Offline
Newbie Poster

script for number of views

 
0
  #1
Jun 1st, 2006
Hi,

I have a webpage with articles and I would like to indicate the number of views for each article. Can anyone help me with the correct form/script in asp format?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 131
Reputation: william_stam is an unknown quantity at this point 
Solved Threads: 2
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

Re: script for number of views

 
0
  #2
Jun 7th, 2006
do you have a database?

if so set up a command to update it. so you would have the article number. when the page is called a recordset retrieves the last value and then adds one. the command then updates the record to be the new value. you might want to use sessions though that it doesnt count EVERYTIME the same user views the page for that session. like a refresh of page.

the other way you could do it if your hosting server is stable is use application variables. which would reset if the server ever went down but is the easiest to use.

the other way is via a text file for each page. it reads the text file adds one then writes back to the text file the updated figure. not very practical as plenty text files get created then
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum


Views: 1451 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC