PHP code example of localzet / tunnel

1. Go to this page and download the library: Download localzet/tunnel 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/ */

    

localzet / tunnel example snippets




localzet\Tunnel\Server('frame://127.0.0.1:9010');
\localzet\Server::runAll();

use localzet\Tunnel\Client;

Client::connect('frame://127.0.0.1:9010');
Client::on('orders', static function (mixed $order): void {
    // Handle the published message.
});
Client::publish('orders', ['id' => 42]);