Page 1 of 1

existing ID counter repeats

Posted: Tue Jan 27, 2009 5:23 pm
by enciel
/*************************************
Title:
Version:1.2
Author:
Demo:
Download:
Website: http://enciel.awardspace.com/winampskins.html

Short description:


*************************************/

hi. i have no problem setting up the php counter all is well the download links are fine and all but here is the problem. i have added 4 links in the phpcounter and so i got automatically generated IDs: lets name them (id 11,12,13,14)

everything was fine the clicks are displayed as they are but then i decided to add new links for download. and then i noticed id 11 was reused by the new link i added. so when i checked the display of clicks for id 11 it was 0. I think the display shows 0 since two ids are being used at the same time but different urls. how do i resolve this?

btw here is an screenshot of what i am saying in case you cannot understand what i am saying (sorry if it's confusing)
http://image-upload.net/images/pt3ib41yh1fi9571rpgt.jpg

Posted: Tue Jan 27, 2009 5:37 pm
by Klemen
This happens if you re-upload a blank (default) ids.txt file and ID numbers get reset. Remove the link ID 11 and change the number in ids.txt to 16 then you can add new links again.

Posted: Tue Jan 27, 2009 6:02 pm
by enciel
thanks a lot for that! that's something i should remember in the future :) it's working perfectly again. thanks again! :D

Posted: Thu Apr 29, 2010 2:14 am
by DC
Klem I must ask a simple queston, while I know you are using the ids txt file for the id sequencing what is the reason for doing it this way? Can't we just read our last line from the clicks file, explode it and choose the id that was used last then count from there.

In my mod version I do not use that file as this becomes a mess if I use the default way of reading the id text file to keep a count sequence or add custom id's. I found my way to work quite well, have I missed somthing? my way is to just read id's directly from our clicks file.

do you see a problem with this idea?

Posted: Thu Apr 29, 2010 9:23 am
by Klemen
I don't see a problem of doing it that way. The best I can remember is I used a separate text file because I was a performance freak 6 years ago when I released the first version and figured it would be slightly faster to just read a number from a file then to parse a 100+ lines file 8) :lol:

Posted: Thu Apr 29, 2010 2:33 pm
by DC
Ah ok I see what your saying on that one, but I do not feel that will be a prob these days plus I do not feel that a script that is text based should be used for masive amounts of link tracking in the first place ... so with that in mind I felt that doing it this way would keep us all in order and we can then use custom id's as well without the problem that I had while trying to use the id text file method.

I will mostlikely post my mod code after a little more testing for others to try.
Thanks for the info Klem ...