Forum Moderators: coopster
Is there a way to limit sessions? As in, make sure that whether you're registered or not, you can only run ONE site-window, or two maximum?
The problem is that people open up over 4 windows (don't ask me why..) at a time, and my bandwidth runs out really fast.
I've tried to look up the different properties of Sessions in PHP but didnt find anything that specifically does that function... anyone? ideas?
Thanks!
~moo
Check out the custom handler session_set_save_handler() in the PHP manual. It has a pretty good example of setting up custom functions to handle sessions. You can link these to a database and store extra information (such as an IP address or user_id) to try and make sure you have only 1 session running at once.
If people open up 4 windows at a time, how would that consume more bandwidth? The browser would normally cache all/most of the graphic files, and I'm sure they can only view and operate one window at a time. If something like that is causing you to run out of bandwidth I reckon it's time to change hosts.
But IMO trying to fight users preferences is a bad move, it just pisses people off. Make sure you have gzip compression enabled as it can cut down on HTML transfers 4-5 times.