Ok I'm helping my friend build his website and my brain is bleeding lol..
I want to put a HTML hit counter on the page. I found one for the date. Found here www.webdevelopersnotes.com/tips/html/formatting_time_using_javascript.php3
Also, I want to use the code to make scrolling pictures. I looked at the source code, but I'm not sure where the code ends and begins exactly. The code I'm talking about can be found here www.dragonnorth.com/htmltricks/scrollpix.html
Can anyone help??
I doubt you'll be able to add a hit counter with just HTML and Javascript. Most likely you'll need to use a server-side programming language in addition to HTML in order to do this.
Does your server support anything like Perl, PHP or ASP?
Hey, Thanks for the info... I believe they support PHP.
" Mekka Lekka Hi-Mekka Hiney Ho"
If all you want is a simple black and white HTML hit counter with the number centered, use this code below and replace "SAmarantine12345678" with something no one has ever thought of. Change the name and it resets back to 1.
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="10" height="2" bgcolor="#C0C0C0">
<tr>
<td width="34" height="2">
<img src="http://www.mit.edu/cgi/counter/SAmarantine12345678" alt="several"></td>
</tr>
</table>
</center></div>
You can make an easy one using PHP.
You'll have to change your files to "name.php" instead of "name.html" and you'll need to have the two following files in the same directory (folder) as the webpage that you want the counter on. So if your website page that it will be on is "www.website.com/index.html" you'll need to change "index.html" to "index.php"
Open notepad and put:
Then Save As "counter.php"
Then open notepad again and put "1" and Save As "hitcounter.txt"
Then take these two files and put them on your web server in the directory that the page that will have the counter is in.
Where ever you want the hit counter to appear put:
This is PHP code that will tell it to find the "counter.php" file and show the current number that is on the "hitcounter.txt" file. Each time the page is loaded the "counter.php" file will load the number from "hitcounter.txt" and add one to it and save the changes.
for scrolling images check out Dynamic Drive
Add new comment