Trying to write a chat, like on facebook, I wondered if two clients can connect to the same PHP-document, or, if 1 PHP-document could communicate with 2 clients at the same time?
(I just took PHP as an example, I don't mind using another server-side scripting language, although PHP is the only serverside scripting language I can program in).
With communicating I mean receiving input AND send output, via AJAX or something like HTML5 SSE.
Is this possible?
How is this called (for googling)?
Thanks.
There are hundreds of tutorials on the web that can explain how to use some technologies you're very familiar with to create a chat system (PHP, Javascript and MySQL):
http://www.tutorialized.com/tutorials/PHP/Chat-Systems/1
I recommend reading at least one of them so you can understand where each piece fits in the puzzle.
Happy coding and best of luck.