Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2004, 06:32 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default track ing hits on web pages

Hi,
I have a web page where there are multiple hyperlinks
on that single page. Now I would want to track the
hits of user clicked on each hyperlink and insert this
data into a textfile. I would need to track hits of
multiple users and save them onto a textfile on the
server. Each day the server would have one text file
incremented. Like reportlog.ddmmyy.txt, and next day
reportlog.ddmmyy with dd increment as long as it is
same month. After that month increment.after that year
increment.
example: reportlog.09072004.txt
next day reportlog.09082004.txt.
And each text file would have multiple rows for each count hit.
Later I would run batch job to move the data from text
file to database.
But now I want code to count hits and send the data
into text file. Each day multiple rows would get
incremented in text file. Later I would move this data into database table.
I would appreciate any help on this.
Thanks in advance.

 
Old September 7th, 2004, 08:40 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default


  As per your post,

  You want to store count and date in a text file. For that, you use

set fso=server.createObject("scripting.filesystemobjec t")
...


create a text file on the name you want(based on date). Before writing data to text file, check whether its already exist or not. If exist, append data in new line.
T count the no of hits, open the text file and count the number of lines in the text file will be the hit count.



 
Old September 8th, 2004, 12:24 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Can i get the code for writing one row at a time with comma or tab seperated for each row. The text file would need to get atleast 4 columns inserted for each hit. and generate new text file next day.
PLease some one of you provide code for this.
I can just create a text file and save it on server but i want this code.
Thanks in adavnce.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Display web cam in web pages peace2007 ASP.NET 2.0 Basics 1 September 17th, 2007 01:07 PM
connect ing to sql 2005 twisted f8 Visual Basic 2005 Basics 1 September 13th, 2007 09:47 PM
folder lock-ing in ASP tiahvera Classic ASP Basics 2 May 7th, 2007 01:12 AM
"And" ing Regular Expression DizzieDazz BOOK: Beginning Regular Expressions 2 March 16th, 2005 12:25 PM
Web pages constructing: I-mode(mobile) pages karib Dreamweaver (all versions) 3 June 6th, 2004 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.