PDA

View Full Version : displaying the counter



lt;h1gt;
09-25-2005, 01:39 PM
hi all
i have got this script working, but am confused as to how to display it within my site..
i have <?php include("counter/counter.php"); ?> in my page, but it doesnt display the same as here http://www.sportstar.co.za/counter/counter.php
please can you help me, thanks
Rich

edit: nice i got it working now ;) changed counter/counter.php to http://www.sportstar.co.za/counter/counter.php

Patrick
09-25-2005, 05:15 PM
Don't do that. That will result in your counter not counting visitors properly.

Instead, include it with the full absolute path.

Try placing the following in abspath.php in the counter folder to see your abs path:

<? echo dirname(__FILE__) . "/"; ?>

Visit the file in a browser.

lt;h1gt;
09-27-2005, 06:16 PM
thanx alot man i got it working now..replaced with absolute url..

i wanted to also ask, how can i not display the total hits?

Patrick
09-27-2005, 09:47 PM
Simply edit counter-display.html to whatever you want the counter to look like.

In your case, you could just simply remove the "<b>Total Hits:</b> !COUNTER-HITS!" line.

lt;h1gt;
10-03-2005, 04:24 AM
slick! thanx for the help Patiek ;)

I have another problem now though, and I have no idea whats causing this...
Every now and again the counter will ouput an error accessing the text db files..Click Here (http://www.richardwdesigns.com/turgis/cutenews/data/upimages/sitestats.jpg) to view the error...at http://www.sportstar.co.za
Now these files are chmod'ed to 666..so why do you think this is happening?
Is it possibly a lag with the server?

now ive also noticed when i view counter/stats/ (http://www.sportstar.co.za/counter/stats) it seems to only be saving stats for each day..:blink:
Thanx for the help