How Reliable are Text files?

Post your Click counter digestion problems here
Post Reply
GonzoBeads
Posts: 1
Joined: Thu Aug 07, 2008 6:09 pm

How Reliable are Text files?

Post by GonzoBeads »

Hi there,

I've noticed you've said text files can't handle large volumes of clicks - how large are we talking about?

Say I get 2000 clicks a day - is that too many?

I love the script so far! I just installed it, but I'm wondering if this will end up working for me with the volume I have planned for the links!

Thanks!
Kyle
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It's hard to say how reliable they are, it depends on may factors (number of links tracking, your hardware, number of clicks, dispersion of clicks per hour,... ). CCount does use file locking, but still for many clicks or links problems can occur.

With 2000 clicks/day I personally would rather use a MySQL-based script with daily (or hourly) statistics and not CCount.
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
moin1407
Posts: 2
Joined: Thu Nov 05, 2009 10:09 pm

Post by moin1407 »

Hi

I am using CCount in my wapsite http://wap360.net.
I like the script.
I converted 7750 links.
I Used 95 sub counters under 1 main counter. I added 100 links in one sub counter.

First I converted file link into ID in sub counter and I converted that sub counter link into ID again in Main counter.

Sub counters are for displaying on webpage and main counter is for total download counter on home page.

I used main counter's link on webpage as hyperlink.
main counter sends to sub counter and sub counter sends to file.

alhamdulillah.... Its handle 1000-1200 clicks daily

I havnt faced any problem yet...

Moin
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post by DC »

2000 clicks yes, best bet MYSQL as the flat file txt db can get currupted if it gets a bad write so althogh file locking helps it is not foolproof. The only way that a text based db script can handel a lot at once are when every file its writing too is seperate, a budy of mine builds his scripts that way and they can handel a lot as the script does not have to re-write a zillion lines of data.

So I think it depends more on how much data must be re-writen each time the file is updated as I have seen large files with thousands of lines of data crash as they get hit mid write and go currupt.

Ive seen this with both perl and php flat file db's

So if your going to be expecting a lot of traffic MYSQL is best.

DC
Last edited by DC on Sat Nov 07, 2009 6:39 pm, edited 1 time in total.
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

I agree with DC, you should really find a script with a MySQL database.
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
moin1407
Posts: 2
Joined: Thu Nov 05, 2009 10:09 pm

Post by moin1407 »

I published my site on 21/10/2009. I added 7754 links. On 11/11/2009 I faced problem in counter. suddenly It cut more than half of text file. it means it doesnt control more than 1 clicks at a time when it contains much links.

Now I am using databased counter! its performance is awesome and faster!

Moin
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

7754 links is 77-times more links that the recommended 100 ones so yes, a SQL database script should defenitely be used due to the limitations of text databases.
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
puniksem
Posts: 47
Joined: Thu Nov 01, 2007 12:25 pm

Post by puniksem »

moin1407 wrote:I published my site on 21/10/2009. I added 7754 links. On 11/11/2009 I faced problem in counter. suddenly It cut more than half of text file. it means it doesnt control more than 1 clicks at a time when it contains much links.

Now I am using databased counter! its performance is awesome and faster!

Moin
Could you not suggest what SQL script you used?
World's shortest poem: We, see.
Post Reply