Page 1 of 1

Need to make a very basic client - server

Posted: Thu Mar 06, 2008 1:25 pm
by legend986
I am trying to make a simple client and server in php when I realized I don't have a web server on my computer and neither do I have any of the fancy stuff. I just have SSH access, and php installed. If I want to send some data from a computer to another computer, how would I do it? Can someone please help me out?

Re: Need to make a very basic client - server

Posted: Thu Mar 06, 2008 1:34 pm
by Christopher
Maybe make a Javascript client that talks to the PHP application via Ajax? There are many Javascript libraries (jQuery, Prototype, Mootools, etc.) that can make it easier to implement something quite nice.

Re: Need to make a very basic client - server

Posted: Thu Mar 06, 2008 1:38 pm
by legend986
Well... I want to use only the command line version of php... Sorry I should've mentioned this in my first post itself... I think what I want is something like a simple p2p application... or maybe I should be doing it using sockets and threads in php... Like when the php script is started, it should start two threads one for listening and one for sending data... But can I have some help in this regard please?

Re: Need to make a very basic client - server

Posted: Thu Mar 06, 2008 2:31 pm
by Zoxive
Could use the SSH extension.

http://us3.php.net/manual/en/ref.ssh2.php