Thread: Apache gurus...
View Single Post
Old 05-06-2005   #5
Nickatilynx
Banned
Want to see your own Advertising Here!
 
Nickatilynx's Avatar
 
Join Date: Oct 2002
Location: Vancouver Canada
Posts: 15,115
Default

Quote:
Originally posted by sarettah@May 6 2005, 07: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
my work here is done....

Nickatilynx is offline   Reply With Quote