GetDotted Domains

Viewing Thread:
"Simple Text Counter"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 17/08/03 at 22:58
Regular
Posts: 787
Has anyone installed a simple text counter on there freeola website that they can recommend me along with the correct variables.

cheers
Tue 19/08/03 at 23:36
Regular
Posts: 45
Thanks for the reply 'cjh', I've installed the script with no probs...well one simple change I'm using an apple mac & when creating the Hits text file using TextEdit under OS X I guess the equivalent of Notepad, its add the extension .txt so I changed the reference to this.
Mon 18/08/03 at 09:19
Regular
"It goes so quickly"
Posts: 4,083
A simple PHP one is:

$File = "/freeola/users/6/5/sr0123456/htdocs/Hits.dat";

if ( file_exists($File)) {
$fp = fopen($File, "r");
flock($fp, 2); # Lock the file to prevent errors occuring.
$Hits = fgets($fp, 1024);
$Hits = trim($Hits);
$Hits = $Hits + 1;
flock($fp, 3); # Release the File Lock.
fclose($fp);
print "

This page has been visited $Hits times

";
$fp = fopen($File, "w");
fwrite($fp, $Hits);
fclose($fp);
} else {
print "

ERROR: The Hits file does not exist

";
}
?>

You will need to place that into the page you wish to display the hits, and ensure that page has a .php extention, not a .htm one.

You will also need to create a text file called Hits. Do this in Windows notepad.

When you upload it, you will need to place both within the htdocs folder, and CHMOD the Hits file so it is readable and writable. If your not sure what that means, read up on your FTP programs manual/help file.
Sun 17/08/03 at 22:58
Regular
Posts: 45
Has anyone installed a simple text counter on there freeola website that they can recommend me along with the correct variables.

cheers

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.