sandstone
sandstone copied to clipboard
Is there a way to publish directly from PHP and not JS
Hi,
Is there a way to send event using publish from PHP directly and subscribe from JS please ?
Any fast example ?
Thank you
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 ?
Yes exactly sir :)
But subscription will be from JS (Autobahn) and Publishing will be from PHP side.
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