Quote:
Originally posted by sarettah@May 6 2005, 10:19 AM
Thanx 
I think though, that it is probably not apache that I need to address, but rather php. 
Been thinking about it a bit, in ASP this would be accomplished with a global defined in the global .asa file. My experience says that anything I can do in ASP I can do beeter in PHP So, I am figuring that there is something I can define through the php configuration that might work 
I didn't want to go to a db or a file just for speeds sake. This is for the contest landing page script. I already have a test version worked out using a mysql table with just the counter in it.
I think, even though it is not really noticeable, that this is a lot more overhead (all things relative) than is necessary to complete the task.
The entire thing is basically
start
Get hitcount - if in file, open file, read var. If in mysql, open db, select from tbl
hitcount ++ - increment, if file write back, close file. if db, update, close db
if hitcount>5
hitcount=1
endif
case
hitcount=1
redirect to team1 url
hitcount=2
redirect to team2 url
hitcount=3
redirect to team3 url
hitcount=4
redirect to team4 url
hitcount=5
redirect to nicks shave script ( )
endcase
end
|
I would do it with a db. It would be lighter with a apache module, but it seems like alot of trouble for no reason.
50k hits, even all on the same day, isnt alot to handle for apache/php/mysql