Script URL:
Version of script: ccount
Version of PHP:
Hosting company:
Have you searched THIS FORUM for your problem: Yes
Write your message below:
This is a great script. I'm using it for tracking and it allows me to put affiliate links on my pages without them getting deleted by Norton's ad blocking.
My question is, About how many links can ccount handle before you would notice a serious dgradation in performance. I realize that is a difficult question if you don't know the performance of the hosting server.
I am only concerned with performance with viewers clicking on links. I'm not worried about the admin panel performance.
I see that it reads through the file to find the right line, redirects to the proper URL and then rewrites the file. I would imagine that you could add several hundred links before things slowed down too much.
SECOND QUESTION
As you get more links, what happens when you get multiple users clicking on the same link at about the same time. I would think if you only have 10 or so links you probably would not run into a problem. I could see a problem if you had a larger file that was being written and you had a couple dozen people clicking on CCount links at the same time.
It looks like the redirect happens AFTER click.php tries to write to the log file. The problem I can see is that if it can't write the 'or die' kicks in and kills the execution before the redirect.
If we were less concerned about the count and more concerned with the redirect it looks like you could take the 'or die' out and ccount would redirect but not update the count. Does this sound right?
Thanks
chris Mendla
How Many links can ccount handle?
Hi Chris,
As I mentioned many times to CCount users this script was never designed for high-traffic sites or for tracking many links. As you already said it is very hard to say where the limit is as it depends mostly on:
1. your server performance
2. number of links you count
3. number of cliks you get (per minute, per hour, ...)
If you get one click per minute that makes 1440 clicks per day and it should all work ok. But if you got that many clicks per hour it could be a problem. The common problem would probably be corrupted clicks.txt file (lines missing, unwritable file, ...). I guess the only way to find out what is the safe limit on your server is by testing.
Removing the die() code wouldn't help since that would bring new errors which PHP prints out (send HTTP headers) and a redirect isn't possible anymore.
To be honest I have no intention of searching high-traffic solutions for CCount, in my opinion we would just be facing new and new problems. CCount just isn't fit for that. The real solution is a (My)SQL based script. I did start writing one (similar to CCount but with a MySQL database and more features), but am not sure when I will be able to finish it, I have a ton of priority work at the moment (yes, I know, I always say that, but it's true
).
Regards
As I mentioned many times to CCount users this script was never designed for high-traffic sites or for tracking many links. As you already said it is very hard to say where the limit is as it depends mostly on:
1. your server performance
2. number of links you count
3. number of cliks you get (per minute, per hour, ...)
If you get one click per minute that makes 1440 clicks per day and it should all work ok. But if you got that many clicks per hour it could be a problem. The common problem would probably be corrupted clicks.txt file (lines missing, unwritable file, ...). I guess the only way to find out what is the safe limit on your server is by testing.
Removing the die() code wouldn't help since that would bring new errors which PHP prints out (send HTTP headers) and a redirect isn't possible anymore.
To be honest I have no intention of searching high-traffic solutions for CCount, in my opinion we would just be facing new and new problems. CCount just isn't fit for that. The real solution is a (My)SQL based script. I did start writing one (similar to CCount but with a MySQL database and more features), but am not sure when I will be able to finish it, I have a ton of priority work at the moment (yes, I know, I always say that, but it's true

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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