2

I was looking at Kanaka's reply to a websockets question here.

If I want to write a native app in PHP to use a websocket based webservice, where do I start? Are there any client libraries available in PHP to write native linux clients? Basically, my server can work on a RESTful architecture for 90% of the time. However, there is one reason for the server to alert the client, so REST won't work here. So I am wondering if websockets is an answer here for me as compared to periodic polling by client.

Community
  • 1
  • 1
Genboy
  • 57
  • 1
  • 6

1 Answers1

0

Why not write the 90% using normal REST and do the remaining part where notifications are sent to the client using web sockets?

Here is a github project that looks like it might be what you want https://github.com/nicokaiser/php-websocket

Relequestual
  • 11,631
  • 6
  • 47
  • 83