Page 1 of 1

Threads and Sockets !!

Posted: Fri Jul 11, 2008 5:01 am
by sj1983msh
Hi friends,

I have a question about sockets and threads in PHP.
Currently I have decided to improve my skills on Threads and Sockets Programming, because I want to implement a CHAT section in my website. So I heard from one of my close friends who once has done it before via Java language that I have to know enough of Threading methods and also Socket Programming.
I have searched over internet in order to find an Article about threading but almost I have not found any.
Please tell me what I need to know for coding a CHAT section.
And if I need Threads to be coded, where I can find a good article which can teach me necessary points. And also for sockets if I need it !

Thank you all

Sincerely Yours
Saman J.

Re: Threads and Sockets !!

Posted: Fri Jul 11, 2008 9:43 am
by s.dot
I tried a socket chat once. Didn't get very far though indeed it's very possible! I ended up going with an AJAX solution using a database. It was much easier. :)

Re: Threads and Sockets !!

Posted: Fri Jul 11, 2008 10:40 am
by sj1983msh
does that mean I don't need to know Threads?

If so, do you know where I can find some AJAX or Sockets (in PHP) articles related !?

Sincerely
S.J.

Re: Threads and Sockets !!

Posted: Fri Jul 11, 2008 12:29 pm
by s.dot
This is the tutorial I initially read and got a working chat from: http://code.jenseng.com/jenChat/

However, I then used the techniques applied in that tutorial and custom built my own chat.

Re: Threads and Sockets !!

Posted: Fri Jul 11, 2008 2:48 pm
by Eran
Check out phpsocketdaemon, a chat server written with PHP sockets - http://www.chabotc.com/phpsocketdaemon/