Author | Comment |
threefingeredguy Ghost
Posted: 8 May 2005 20:49 GMT Total Posts: 1189 | any one want to write me counter? or find one i dont have to sign up for? please? ok bye.
--- Someone call for an exterminator? |
allynfolksjr Administrator
Posted: 8 May 2005 20:54 GMT Total Posts: 1892 | A counter for what? |
BullFrog Wraith Posted: 8 May 2005 21:08 GMT Total Posts: 623 | I would imagine it's for a webpage. I don't know of any other counters, personally.
--- "Men are not prisoners of fate, but only prisoners of their own minds." -Franklin D. Roosevelt |
allynfolksjr Administrator
Posted: 8 May 2005 21:15 GMT Total Posts: 1892 | Ohh, okay, that's easy then. :-) |
Lunchbox Carrier
Posted: 8 May 2005 21:59 GMT Total Posts: 2007 | If you have access to a SQL server, it's really easy. |
allynfolksjr Administrator
Posted: 8 May 2005 22:03 GMT Total Posts: 1892 | Or even if you don't, a text file dbase would work nicely. |
spiral Wraith Posted: 8 May 2005 23:19 GMT Total Posts: 958 | or just get a script powered by another site. |
threefingeredguy Ghost
Posted: 9 May 2005 21:03 GMT Total Posts: 1189 | so uh, allyn, how would i go about implementing one of these?
--- Someone call for an exterminator? |
Lunchbox Carrier
Posted: 9 May 2005 21:27 GMT Total Posts: 2007 | What kind of resources do you have first of all? |
threefingeredguy Ghost
Posted: 10 May 2005 19:17 GMT Total Posts: 1189 | er, i dont know. i own and manage the domain through globat hosting. what kind of resources do you want?
--- Someone call for an exterminator? |
Lunchbox Carrier
Posted: 10 May 2005 19:39 GMT Total Posts: 2007 | PHP/cgi-bin access would be required, and mysql would make it easier. |
allynfolksjr Administrator
Posted: 10 May 2005 20:08 GMT Total Posts: 1892 | Well, you don't need the cgi-bin for PHP.
But as for a counter itself, what you would basically do is create a database with the field: clicks, ID, page.
So when you visit a page (that is .cgi or .php), it will activate a script that pulls the correct ID for that page from the database, increment that click count, and then insert the new total into the database. But that is an over simplified description. :-\
For the actual ID of the page, you could use an enviroment var to take the URL that the script is from, and search for that in the dbase, and take off from there. And of course, have it make sure the page was access before, and add a new field if it was not.
[Edited by allynfolksjr on 11-May-05 05:20] |
Lunchbox Carrier
Posted: 11 May 2005 07:59 GMT Total Posts: 2007 | *I meant php or cgi-bin, not necessarily both
Also, instead of testing to see if page Id is there already, create them all in advance and just pull the name from $PHP_SELF (if using php) or perl equivalent and dump it into the ID field. |
allynfolksjr Administrator
Posted: 11 May 2005 17:05 GMT Total Posts: 1892 | Seeing if it existed already would make putting the counter on a new page much easier, because you wouldn't have to muck around adding the link to the database. |