Jump to content

Php Server-like Page


AndrewM16921

Recommended Posts

So I was wondering if there is a way to create a server-like behavior with php. That is to say, a sort of "static" variable set that can be accessed and shared between all php sessions. And if this is possible, how would I go about setting it up?

 

Thanks

Link to comment
Share on other sites

There is many way to persist data. You can use database,flat files. there is APC,memcached like extension which can store data in memory to share data between request. which one will be better is depend upon what you need to do actually.

Link to comment
Share on other sites

You can store session data in database where there will be timestamp of last time update. after that getting last 15 minute would be trivial sql query. Check http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCsQFjAA&url=http%3A%2F%2Fphp.net%2Fmanual%2Fen%2Fclass.sessionhandlerinterface.php&ei=jd_nUfSjAcW8rAfjv4FI&usg=AFQjCNFC98sy68egSNGfVuZkaDRxQ3G6mA&bvm=bv.49478099,d.bmk . APC would not be necessary for this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...