Need to make a very basic client - server

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
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Need to make a very basic client - server

Post 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?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Need to make a very basic client - server

Post 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.
(#10850)
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Re: Need to make a very basic client - server

Post 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?
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: Need to make a very basic client - server

Post by Zoxive »

Could use the SSH extension.

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