Count in one place, show in another

In case you have problems with some other PHPJunkyard script (not that there are THAT many).
Post Reply
Tharkun

Count in one place, show in another

Post by Tharkun »

Script URL:
Version of script:
Version of PHP:
Hosting company:
Have you searched THIS FORUM for your problem:
(if not please do before posting)
If so, what terms did you try:

Write your message below:
I downloaded the gcount10.zip counter and it works great. But here is the tricky part: is there a way to count visits in the home page (index.html) and show that number of visits in another page (number_of_visits.html for example)?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

You can use Rene's add-on for viewing count in a separate page:
viewtopic.php?t=291

To not display the count try opening graphcount.php in a plain text editor (Notepad, Wordpad) and replace this code:

Code: Select all

for ($i=0;$i<strlen($count);$i++) {
    $digit=substr("$count",$i,1);
    // Build the image URL ...
    $src = $base_url . $style_folder . $digit . "." . $ext;
    echo "document.write('<img src=\"$src\" border=0>');\n";
}
with this:

Code: Select all

echo ' ';
Haven't tested it, but should work...

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply