Apr 25th, 2005, 09:28 AM
#1
Thread Starter
Fanatic Member
Hit Counter
Hi, all
How do I make a Hit Counter for ny web page?
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 25th, 2005, 10:26 AM
#2
Hyperactive Member
Re: Hit Counter
does your server have php installed?
If there is only one perfect person in the universe, does that make them imperfect?
Apr 25th, 2005, 12:18 PM
#3
Thread Starter
Fanatic Member
Re: Hit Counter
Originally Posted by
dandono
does your server have php installed?
YES.
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 25th, 2005, 01:31 PM
#4
Hyperactive Member
Re: Hit Counter
why dont you have a php page as your index and make that so that it adds 1 to the value that is in a text file and make your default page have a little php code that prints what is in that text file to the page.
If there is only one perfect person in the universe, does that make them imperfect?
Apr 25th, 2005, 11:33 PM
#5
Thread Starter
Fanatic Member
Re: Hit Counter
I do not know how to do it.
My web address is http://bob5731.no-ip.info
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 26th, 2005, 01:33 PM
#6
Hyperactive Member
Re: Hit Counter
http://www.w3schools.com/php
what you want to do is get it to read the value that is in a text doc and then do a sum of (whats in text doc) + 1 and save to the doc. i can make a code but i dont have enough time at the mo. i will make it in like half an hour and post it.
Last edited by dandono; May 2nd, 2005 at 09:21 AM .
If there is only one perfect person in the universe, does that make them imperfect?
Apr 26th, 2005, 04:40 PM
#7
Thread Starter
Fanatic Member
Re: Hit Counter
The link dose not work for me.
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 27th, 2005, 01:16 AM
#8
Fanatic Member
Apr 27th, 2005, 03:05 AM
#9
Apr 27th, 2005, 03:09 AM
#10
Apr 27th, 2005, 03:21 AM
#11
Re: Hit Counter
Attached Images
Apr 27th, 2005, 03:29 AM
#12
Thread Starter
Fanatic Member
Re: Hit Counter
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 27th, 2005, 03:58 AM
#13
Fanatic Member
Re: Hit Counter
VB Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
fclose($file);
print "count=".$count[1];
?>
</body>
</html>
Full article, here .
Apr 27th, 2005, 10:30 AM
#14
Thread Starter
Fanatic Member
Re: Hit Counter
Last edited by bob5731; Apr 27th, 2005 at 10:34 AM .
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 27th, 2005, 11:01 AM
#15
Thread Starter
Fanatic Member
Re: Hit Counter
how do I do it?
Instructions:
1) Download the EZ Counter zip.
2) Unzip its contents and upload the files to your PHP enabled webserver.
3) CHMOD "ezcounter.txt" to "777" so that the file is writeable.
4) Add this line of PHP code to your page to increment and print the counter:
include("ezcounter.php");
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 27th, 2005, 11:27 AM
#16
Re: Hit Counter
Originally Posted by
bob5731
Instructions:
1) Download the EZ Counter zip.
2) Unzip its contents and upload the files to your PHP enabled webserver.
3) CHMOD "ezcounter.txt" to "777" so that the file is writeable.
4) Add this line of PHP code to your page to increment and print the counter:
include("ezcounter.php");
You need to follow those instructions.
Apr 27th, 2005, 11:40 AM
#17
Thread Starter
Fanatic Member
Re: Hit Counter
How do I do.
CHMOD "ezcounter.txt" to "777" so that the file is writeable
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 27th, 2005, 02:34 PM
#18
Hyperactive Member
Re: Hit Counter
try CHMOD "excounter.txt" to "0777" i dont know if there is a difference between "0777" and "777". sorry that i did not write code in time but someone uploaded a virus to my website (i am not talking about my self) so i have now blocked anonymous ftp on it.
Last edited by dandono; Apr 27th, 2005 at 02:54 PM .
If there is only one perfect person in the universe, does that make them imperfect?
Apr 29th, 2005, 06:11 PM
#19
Addicted Member
Re: Hit Counter
I have used the following code in my page and it works absolutely fine:
<?php
$countfilename = "VisitorCount.txt";
$whattoread = @fopen($countfilename, "r") or die("Error opening count file");
$contents = fread($whattoread, filesize($countfilename));
fclose($whattoread);
$contents = ($contents + 1);
$whattoread = @fopen($countfilename, "w") or die("Error opening count file1");
@fwrite($whattoread, $contents) or die("Error with addition");
fclose($whattoread);
echo $contents;
?>
Just make sure you set the VisitorCount.txt CHMOD to 777. I do this via an FTP client, much easier!!
BIOSTALL
Apr 29th, 2005, 08:03 PM
#20
Thread Starter
Fanatic Member
Re: Hit Counter
Can you all make the file for me.
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Apr 30th, 2005, 06:06 AM
#21
Addicted Member
Re: Hit Counter
U mean the text file or the php file??
May 1st, 2005, 08:46 PM
#22
Thread Starter
Fanatic Member
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
May 31st, 2005, 04:39 PM
#23
Hyperactive Member
Re: Hit Counter
try this zip file. it is what i use on my server and it works fine. it is an image counter.
Attached Files
If there is only one perfect person in the universe, does that make them imperfect?
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width