Closed Venzon closed 10 years ago
Is there any simple way to connect and subscribe to topic from php script? not from client using js
I have server running and would like to subscribe to topic from controller of my app.
I did read a bit about zeromq but cannot use it while it require php extension.
I try like this but dont have any info from running server that client managed to connect nor subscribe:
$context = new \ZMQContext(); $subscriber = new \ZMQSocket($context, \ZMQ::SOCKET_SUB); $subscriber->connect("tcp://127.0.0.1:8080"); $subscriber->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "test");
pls help
btw do you know any good way to kill clank server and restart it while its being started using cron?
I checked that this client works with Rachet WAMP implementation https://github.com/bazo/wamp-client
Is there any simple way to connect and subscribe to topic from php script? not from client using js
I have server running and would like to subscribe to topic from controller of my app.
I did read a bit about zeromq but cannot use it while it require php extension.
I try like this but dont have any info from running server that client managed to connect nor subscribe:
$context = new \ZMQContext(); $subscriber = new \ZMQSocket($context, \ZMQ::SOCKET_SUB); $subscriber->connect("tcp://127.0.0.1:8080"); $subscriber->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "test");
pls help
btw do you know any good way to kill clank server and restart it while its being started using cron?