sandstone icon indicating copy to clipboard operation
sandstone copied to clipboard

Is there a way to publish directly from PHP and not JS

Open miranos opened this issue 6 years ago • 3 comments

Hi,

Is there a way to send event using publish from PHP directly and subscribe from JS please ?

Any fast example ?

Thank you

miranos avatar Sep 17 '18 16:09 miranos

You want something like a PHP websocket client so that that PHP client subscribes to websocket server, publish events and act like a JS client ?

alcalyn avatar Sep 18 '18 07:09 alcalyn

Yes exactly sir :)

But subscription will be from JS (Autobahn) and Publishing will be from PHP side.

miranos avatar Sep 18 '18 15:09 miranos

Unfortunately, there is not a lot of WAMPv1 PHP client (https://wamp-proto.org/implementations/index.html) :)

Also, using wamp server from a php client is not a common solution, I guess maybe that's why there is more JS websocket clients than PHP clients.

There should have a way to broadcast through your topics by using them as a service and calling a method on them hat itsel broadcast a message... I could help more by knowing your use case

subscription will be from JS (Autobahn) and Publishing will be from PHP side.

This is a common case, and the solution is not to publish from a PHP client

alcalyn avatar Sep 18 '18 15:09 alcalyn