Counter does not increase

Everything related to CCount PHP click counter
Post Reply
Doctor Watson
Posts: 2
Joined: Sat Jul 25, 2009 9:01 am

Counter does not increase

Post by Doctor Watson »

Website http://competitionmaker.m-v-p.net

Hello.

I have just tested CCount and it works fine, but I have run into a problem.
The item I would like to count the clicks for is a Flash button called "Download".
The buttons original link is <a href="http://www.guistuff.com/"><img border="0" src="http://www.guistuff.com/images/11dot.gif" width="1" height="1"></a> and it just points to a zip file. People click on it to download the file (smart, isn't it '8)' )
In the Admin Panel I created link 1 to http://www.guistuff.com/ and substituted the href to
<a href="http://competitionmaker.m-v-p.net//count/click.php?id=1"> ("competitionmaker.m-v-p.net being my site" and "/count" the folder with the Click Counter files.
So far so good and when I click on the button, download does start. But the click counter doesn't change. I have set it's initial value to 1 and it stays at 1.
Any idea how that is ? Am I doing something wrong ?
Or does the counter not change when I click on the button, but does change when somebody else does ?
Please feel free to visit my site and then I can see it that works or not.
Greetings
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Your URL is wrong (doesn't exist):
http://competitionmaker.m-v-p.net//count/click.php?id=1

Where exactly did you install CCount? What is the URL you use to access administration? Use the same URL just replace "index.php" in the admin URL with "click.php?id=1"
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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

The click counter does not work because it is attached to a 1x1 pixel transparent image and not to the flash-download button. The 1x1 image is positioned one line below the download button.


Also the link attached to the 1x1 pixel points to http://competitionmaker.m-v-p.net//count/click.php?id=1 and this link does not work, i get a "404 url not found error". I tried also some variations on the link (1 / instead of 2 // and ccount instead of count) but that also gives a 404 error.

Thus, besides attaching the ccount link to the right button you also need to correct the link to the click.php file.

Greetings,
Henrie

EDIT: Klemen was a little faster about the download link, we wrote in the same time. But he did not mention it was attached to the wrong button (at least for me using Firefox 3.5)
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Doctor Watson
Posts: 2
Joined: Sat Jul 25, 2009 9:01 am

Post by Doctor Watson »

Hello Klemen & Henrie.

Indeed, the line http://competitionmaker.m-v-p.net//count/click.php?id=1 contained an error. I did put accidentally a // before count.
As I am not good at home (yet) with php, it has taken me some time to figure out what and where to change.
I have now set the button to point at http://competitionmaker.m-v-p.net/Count/click.php?id=2 (created a new link to make sure) and it reacts as it should.
And there was second problem that I had overlooked : As you said even http://competitionmaker.m-v-p.net/count/click.php?id=2 does not work and produces a 404 error . That is because of high case-sensitivity on my server. It should have read Count instead of count. :oops:

Thanks for the help.
Two beers coming up ! :wink:

Michel (Doctor Watson)
Greetings
Post Reply