Share variables between different sessions on server?
Moderator: General Moderators
Share variables between different sessions on server?
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?
Use a database.
Re: Share variables between different sessions on server?
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.