Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 counter asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ez4arab
Junior Member

479 Posts

Posted - 12 July 2001 :  06:14:50  Show Profile  Visit Ez4arab's Homepage
i need counter for hit link

ex
this link hit 34 times <------ some thing like this

any body who have this


RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 12 July 2001 :  06:58:38  Show Profile  Send RaiderUK a Yahoo! Message
check at aspcode.net or aspcode.com i am sure i've seen one there at some time.

Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 12 July 2001 :  08:29:34  Show Profile  Visit Ez4arab's Homepage
i get this code for counter i would like someone who expert in asp to do this.

i want link this scrpit with the forum. when member put link to TOPIC the script count the link how many hit

this is the code
<html>
<title>CodeAve.com(Daily Hit Counter)</title>
<body bgcolor="#FFFFFF">

<%
on error resume next

' Create a server object
set fso = createobject("scripting.filesystemobject")

' Target the text file to be read.
' The text file is continually updated with the current date from the server
set act = fso.opentextfile(server.mappath("daily_count-"& month(date()) & day(date()) & year(date())&".txt"))

' Read the value contained in the current day hit counter
' If there is no file for the current day the on error resume next command above
' will force the program to the next line
counter = clng(act.readline)

' Add one to the counter. If there was no value the counter will be set to a value of one
counter = counter + 1

' Close the text object.
act.close

' Create a new text file on the server with the current date as part of the name
Set act = fso.createtextfile(server.mappath("daily_count-"& month(date()) & day(date()) & year(date())&".txt"), true)

' Write the counter value to the text object
act.writeline(counter)

' Close the text object
act.Close

'Write out the date and total hits for the current day
%>
<%= counter %> Total Hits for <%= date() %>

</body>
</html>





Edited by - aljish on 12 July 2001 08:36:34
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07