PHP code example of intermaterium / phpzmq
1. Go to this page and download the library: Download intermaterium/phpzmq library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
intermaterium / phpzmq example snippets
/* Create new queue object */
$queue = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, "MySock1");
/* Connect to an endpoint */
$queue->connect("tcp://127.0.0.1:5555");
/* send and receive */
var_dump($queue->send("hello there, using socket 1")->recv());