Refresh Stats Click Counter

Everything that doesn't belong to any other forum but this one. If it doesn't belong here then it ... well, it just doesn't.

Moderator: mkoch227

Post Reply
tomowa
Posts: 2
Joined: Sun Apr 04, 2010 7:50 pm

Refresh Stats Click Counter

Post by tomowa »

Greetings, I'm a licensed user of Click Counter. Does exactly what I need.
Looking at the code, I am intrigued by the 'Refresh Stats' link and php coding, that truely reloads a new page.

Code: Select all

<a href="index.php?<?php echo mt_rand(1000,9999); ?>">Refresh stats</a>
I have it implemented on a page I use (unrelated to Click Counter, and is behind pw protected page), but when I click it,
http://www.seedrite.com/records/circle_status.php?2191
I end up with server response of "Invalid Variable Request", I imagine because the page does not know what to do with the appended 4 digit variable.
Studying your code, I cannot see how you work around this. Do you care to share? It would be worth another $15 to me :D I am far from being an accomplished coder :(
Thanks, Tom
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

That's not a PHP issue, but an issue with the way your circle_status.php file handles input (or what variables it expects).

You can try fully defining a variable, for example instead of just "2191" use something like "&refresh=1291"

Code: Select all

<a href="circle_status.php?&refresh=<?php echo mt_rand(1000,9999); ?>">Refresh stats</a>
(if the circle_status.php doesn't expect any other variables you can skip the & before refresh)
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
tomowa
Posts: 2
Joined: Sun Apr 04, 2010 7:50 pm

Post by tomowa »

Don't know what it does, but adding "refresh=" to the link did the job. Thanks!

Didn't buy you a beer, but instead just bought the HESK script. I plan to (sometime when time is found :( ), use it on the website I maintain for my towns chamber of commerce www.odessachamber.net. As is, when people send in an email inquiry from the contact form, it gets cc'ed to many people here, but know one knows if/anyone answers it. This should solve that problem 8).
Post Reply