existing ID counter repeats

Post your Click counter digestion problems here
Post Reply
enciel
Posts: 2
Joined: Thu Jan 01, 2009 11:21 am

existing ID counter repeats

Post 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
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
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
enciel
Posts: 2
Joined: Thu Jan 01, 2009 11:21 am

Post by enciel »

thanks a lot for that! that's something i should remember in the future :) it's working perfectly again. thanks again! :D
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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?
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: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post 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:
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
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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 ...
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] ...
Post Reply