Hello i have been getting into ajax and JavaScript web dev lately and was looking for a way to have the browser update when new info is received i finally found it ... WebSockets I can do the client side and JavaScript fine but the server side is escaping me i just dont get it. I would like it to be done in php because it a language i understand... I've done a lot of searching but the pages google give me don't explain.
Anyways long story short i would like to be pointed to a simple php websocket script. Ill dissect it myself and come back if i need any help.
Sorry This prob seems like bad research but i have been looking for a easy script for days that i can understand.
Thank you in advanced!
Edit:
After much work with Sockets I highly recommend NodeJS. It's good at what it does. Php also has some problems with mutlithreading (which is pretty much a necessity for WebSockets).
At the time of asking this question I didn't make it clear that I didn't want to use a library. I just wanted a small script.
Just want to share Ratchet websockets.
it has fair documentations and explaination on how it works, you just need a little time to understand and research about it.
you can start by looking it's Process Flow http://socketo.me/docs/flow
Good Luck! :)
PS. You need ngnix for your server to have SSL support or use stunnel3 if you really insist on using apache. https://groups.google.com/forum/#!topic/ratchet-php/0P920TwwAuk