Simple Client/Server system

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
unorthodoxParadox
Forum Newbie
Posts: 2
Joined: Wed Aug 20, 2008 3:32 pm

Simple Client/Server system

Post by unorthodoxParadox »

I need to make a simple client/server system where the clients send requests to the server which in turn affects a object of a class stored in a session(on the server side). The clients will also have to have a kind of "refresh" button that makes the client request a copy of the server side object so that the client can see what has happend to the object.

I know nothing about thesse kinds of structures, would the said functions be hard to implent?

Thanks for your time
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: Simple Client/Server system

Post by ghurtado »

In those terms, it shouldn't be hard at all. You have basically just described the simplest possible web application: a client (the browser) accessing data from a server (a web or application server), and the ability to "refresh" the data, which is already built into all web browsers.
unorthodoxParadox
Forum Newbie
Posts: 2
Joined: Wed Aug 20, 2008 3:32 pm

Re: Simple Client/Server system

Post by unorthodoxParadox »

Did you understand my question? I want a Client/server system in php that can make the following:

Client1 logs on to the system
Client2 logs on to the system at which
server creates a new object and stores it in a session(lets call the object elephant and have it be of the elephantClass)
Client1(or whichever client that is a valid to interact with elephant on the server) says: i want to know about the elephant
server recieves the request and send a query back at the client: "elephant is pink and weights 2 lb"
Client2 says: i want to change the elephants color
server recieves the request and changes the elephants color to gray
Client1 again asks to know about the elephant, at which the server replies: "elephant is gray and weights 2 lb"

Something like that? Does that sound plausible? If I missinterpreted the answer then pleaser provide some psudeocode or something.
Thanks again
Post Reply