PHP code example of bclibraries / libraryh3lp

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

    

bclibraries / libraryh3lp example snippets


use BCLib\Libraryh3lp\Queue;
use BCLib\Libraryh3lp\Resolver;

// Build a resolver with the LibraryH3lp queues we use, in order of preference.
$resolver = new Resolver([
    new Queue('queue-1', 'Optimal Queue'),
    new Queue('queue-2', 'Second Best Queue'),
    new Queue('queue-3', 'Backup Queue')
]);

// Get the best LibraryH3lp queue URL...
$url = $resolver->resolve();

// ...or redirect to best LibraryH3lp queue.
$resolver->redirect();

$queue = new Queue('queue-code', 'Queue Title', '99999', true);