PHP code example of reich / longpolling

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

    

reich / longpolling example snippets


\Reich\PHP\LongPolling::check(1000, function() {
	// we are inside a continuing loop,
	// return some data to the client.
	// Only if the data has been changed / modified 
	// the client will recieve the changes.
});