PHP code example of necromant2005 / tt-long-pooling

1. Go to this page and download the library: Download necromant2005/tt-long-pooling 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/ */

    

necromant2005 / tt-long-pooling example snippets


use TweeLongPooling\Service\LongPooling;

$options =  [
    'callsLimit' => $callsLimit,
    'callback' => $callback,
    'response' => [
        'done'  => $done,
        'wait'  => $wait,
        'error' => $error, 
    ],
]; 
   
(new LongPooling($options, $listen, $timePeriod))->run();