Page 1 of 1

Share variables between different sessions on server?

Posted: Thu Dec 02, 2010 8:32 am
by Tchapman
Is it possible to share variables between different users connected to a server? For example, if one client loads a php file and is able to send variables to the server, and the server can respond to that client, can another client at a different location load a php file on the same server and have the two clients have access to each others variables? I think it would be easy to have each client create a file on the server or FTP and the other client could read those files, but I am looking only for temporary real time solution, almost like a relay chat works.

Re: Share variables between different sessions on server?

Posted: Thu Dec 02, 2010 3:26 pm
by requinix
Use a database.

Re: Share variables between different sessions on server?

Posted: Fri Dec 03, 2010 12:07 am
by Tchapman
Great, thanks for that advice. I did figure out how to have the two devices reading and updating the database and it is pretty close to real time transfer, more than adequate for the application.