Computing.Net > Forums > Web Development > hit counter in frontpage

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

hit counter in frontpage

Reply to Message Icon

Name: ehab
Date: May 18, 2004 at 14:57:19 Pacific
OS: win98 se
CPU/Ram: 1000/382
Comment:

hi all ,
i made a hit counter in frontpage , and put it in the bottom of the page, but don't know why its not working ... any help ?

www.lala-bekaa.com

thanks
Peace !!



Sponsored Link
Ads by Google

Response Number 1
Name: FBI Agent
Date: May 18, 2004 at 18:33:57 Pacific
Reply:

lol, dont ya just hate those things!?! i have this script that i created for use in php, if your webserver has access to php you could use this.

//Author: Dylan Jess
<?php
/* counter */
$datei = fopen("countlog.txt","r"); //opens countlog.txt to read
$count = fgets($datei,1000);
fclose($datei);
$count=$count + 1;
$datei = fopen("countlog.txt","w"); // opens to write and deletes the old count
echo "<**bold**>$count<**/bold**>";
fwrite($datei, $count);
fclose($datei);
/* tracker */
$filename = "tracker.htm";
$fp = fopen($filename,"a");
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("m.d.Y @ g:i a");
fputs($fp,"$
");
fclose($fp);
?>

i just made this script like 10 minutes ago, ill be making it easier to read on the tracker part and will post back when i finish. that works pretty much fine though.


if you use the script, please include the signature. thanks

FBI_Agent



0

Response Number 2
Name: Terri Kaduck
Date: May 18, 2004 at 19:36:00 Pacific
Reply:

It won't work till you save and publish your site. Mine work fine on all 59 of my pages. And on about 20 more pages on other sites I made and host for other companies.


0

Response Number 3
Name: rohinkoul
Date: May 19, 2004 at 01:27:28 Pacific
Reply:

here is a simple one which I wrote for my site.

<?

$file=fopen("./counter.dat","r+");
fscanf($file,"%d",$counter);
if($counter=="")$counter=0;
print "$counter";
$counter=$counter+1;
rewind($file);
fwrite($file,$counter,100);
fclose($file);

?>

You may like to make the output more fancy by using HTML in the print statement


0

Response Number 4
Name: rohinkoul
Date: May 19, 2004 at 01:28:51 Pacific
Reply:

PS : if you want us to tell you why your counter doesnt work you gotta tell us how you implemented it. Post the code if possible


0

Response Number 5
Name: chaud
Date: May 19, 2004 at 04:52:39 Pacific
Reply:

The counter doesnt work because most likely the server doesnt have frontpage extentions enabled....Thats all...

http://excellhosting.net for all your hosting needs.


0

Related Posts

See More



Response Number 6
Name: ehab
Date: May 19, 2004 at 12:46:21 Pacific
Reply:

thanks all for your support...
i will try your php codes .. :)
and yes my host have frontpage extension installed.
and how implemnted it ...
i just put .. add counter .. and it got added ... its frontpage ...

and it was working , i edited the local news , and re upload , and it stoped working ..

and yes , i know i have to publish it to work , i published it , and its not working yet ...

thanks all for support.. :)
peace !!


0

Response Number 7
Name: Terri Kaduck
Date: May 19, 2004 at 14:53:33 Pacific
Reply:

When you edited your local news page was the counter showing a box with a red x in it? When this happens you have to click on it and renew its values. You just have to click on it and pick the counter you want again. Your numbered views are usually still set in the counter box.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Change content automatica... MCAD readiness eval



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: hit counter in frontpage

Need Simple Hit Counter www.computing.net/answers/webdevel/need-simple-hit-counter/1302.html

FREE Hit Counter www.computing.net/answers/webdevel/free-hit-counter/1290.html

Web/Hit Counter www.computing.net/answers/webdevel/webhit-counter/2607.html