Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Backwards Hit Counter?


ghost's Avatar
0 0

Hey, I've tried a few ways of making my hit counters go backwards starting from 50,000 and going down each time the site gets a hit, but I can't really get anything to go right. I've mainly just been playing around with a basic hit counter code in php and javascript. Thank you all in advance. Any thoughts please? =D


spyware's Avatar
Banned
0 0

First thought: post your code (use [code] tags and switch off smilies).


ghost's Avatar
0 0

[?php $count_my_page = ("hitcounter.txt"); $hits = file($count_my_page); $hits[50017] –; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[50017]"); fclose($fp); echo $hits[50017]; ?]

alright, this is the php i tried.


spyware's Avatar
Banned
0 0

Okay read this: http://www.stevedawson.com/article0007.php

If you follow those steps, and modify the code a little bit (2 chars need modification to be exact), you'll get your counter.

If there are problems, post them here.


ghost's Avatar
0 0

Thank you, man =D


ghost's Avatar
0 0

Thank you, I got it to work perfectly ^^


ghost's Avatar
0 0

Thank you, I got it to work perfectly ^^