|
Description: | |
I want to have Image Hit Counter on my home page. | |
Solution: | |
Add the following code into your Home Page
.asp file at the position of your
choice. <% set fso = createobject("scripting.filesystemobject") set act = fso.opentextfile(server.mappath("counter.txt")) counter = clng(act.readline) counter = counter + 1 act.close Set act = fso.CreateTextFile(server.mappath("counter.txt"), true) act.writeline(counter) act.close counter_length = len(counter) for i = 1 to counter_length %> <img src="/images/<%= mid(counter,i,1) %>.gif"> <% next %> (SAVE AND CLOSE YOUR FILE) Create a file named counter.txt in your home directory (Example: "c:/websites/yourdomaincom") and store the initial value that you want in it (Example: 101) Download
the file images.zip
and extract it in a folder named images in your home directory. |
hostonjava | 4/18/2024 2:20:58 AM |