[snip]
Anyone got a script so I can count clicks on adverts. Doesn't have tosve
to
myqsl or anything just a text file will do.
[/snip]
?php
if(yes == $adClicked){
$adClickCountFile = fopen(countClick.txt, w);
$getCount = fgets($adClickCountFile, 4096);
$newCount = $getCount + 1;
On Wed, November 29, 2006 11:21 am, Jay Blanchard wrote:
[snip]
Anyone got a script so I can count clicks on adverts. Doesn't have
tosve
to
myqsl or anything just a text file will do.
[/snip]
?php
if(yes == $adClicked){
$adClickCountFile = fopen(countClick.txt, w);
$getCount =
[snip]
This has a race condition where a busy server, or even a not-so-busy
one where 2 people happen to click at the same time, at least one of
them will be missed, at best.
There's also a distinct possiblity of the counter file getting
completely trashed, depending on the OS and its underlying
Ross wrote:
Anyone got a script so I can count clicks on adverts. Doesn't have tosve to
myqsl or anything just a text file will do.
What about using mysql, but use a memory resident heap table, then every
once in a while write this to a file or even better to a myisam table
Ta
Ross
4 matches
Mail list logo