PHP code example of madbyad / mpl-long-poll

1. Go to this page and download the library: Download madbyad/mpl-long-poll 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/ */

    

madbyad / mpl-long-poll example snippets




use MadByAd\MPLLongPoll\LongPoll;




use MadByAd\MPLLongPoll\LongPoll;

 so we can read the json easily
LongPoll::setJsonFlags(JSON_PRETTY_PRINT);

LongPoll::informPeer("madbyad", [
    "message" => $argv[1],
]);



use MadByAd\MPLLongPoll\LongPoll;

er("madbyad", false);
    read();
}

read();