Page 1 of 1

Client Server Theory and Practice

Posted: Wed Feb 01, 2012 7:50 am
by poppo0
Hey guys,

This is my first post so congrats to me! =)

I have a little problem in trying to implement a client server. I'm trying to get a simple app on facebook. Obviously it's developed in php mostly.
I have a client side code that is supposed to connect to server. So the server has to be listening to accept connection... my problem is that I'm not sure exactly how to be doing this.
Ideal for me would be to make the server.php file run somehow, maybe by some command used in the client.php file? The server is handling a DB so there's more than a few code lines on it.

I'm stuck with this simple yet annoying issue.
Any code little code example for what I should actually do to solve this would be greatly appreciated.
Thanks a lot guys.

Re: Client Server Theory and Practice

Posted: Fri Feb 17, 2012 5:57 am
by Weiry
I face this with a similar sort of scenario and i was pointed in the direction of using an existing protocol system such as XMPP or AMQP to deliver your messages.
There is code examples around for communicating on both protocols in PHP ( http://code.google.com/p/xmpphp/ || http://php.net/manual/en/book.amqp.php )
Regardless of which way you do it, you could run into problems where people *could* inject code directly into your system. So make sure to sanitize EVERYTHING!