PHP code example of virtual-queue / people-forwarder

1. Go to this page and download the library: Download virtual-queue/people-forwarder 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/ */

    

virtual-queue / people-forwarder example snippets


#index.php
lQueue\PeopleForwarder\PeopleForwarder;
$forwarder = new PeopleForwarder('tuticketera', '123456');
$forwarder->forward();


VirtualQueue\PeopleForwarder\PeopleForwarder;
use VirtualQueue\PeopleForwarder\Exception\SdkException;

$action = $_GET['action']; //activate|deactivate
$timestamp = $_GET['timestamp'];
$signature = $_GET['signature'];

$forwarder = new PeopleForwarder('tuticketera', 'private_key');
// 'tuticketera' es el subdominio dentro de virtual-queue. Ej. https://tuticketera.virtual-queue.com

try {
    $forwarder->dispatchAction($action, $signature, $timestamp);
}   catch (SdkException $e) {
    echo $e->getMessage();
}