Page 1 of 1

[ask] socket programming in PHP ?

Posted: Tue Sep 27, 2011 4:13 am
by cordyceps
Hello,

I wanna ask something.

Can php use in socket programming? For the example is chatting system. I wanna build some games that the client will use Java and the server use PHP (CGI). If you've ever do like this, please share it to me?

Thanks.

Re: [ask] socket programming in PHP ?

Posted: Tue Sep 27, 2011 5:51 am
by Mordred
Yes, you can.

I have an old and abandoned (but working) open source project you can check for reference:
Philtron - a filtering HTTP proxy

Socket manual:
http://bg.php.net/sockets

Re: [ask] socket programming in PHP ?

Posted: Tue Sep 27, 2011 9:14 am
by Weirdan
http://www.pinetd.com/ - php networked daemon framework. I know there is a DNS server implemented on top of that, and I think there were FTP and SMTP servers implemented as well.