1. Go to this page and download the library: Download rv/tproto library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rv / tproto example snippets
returnnew \Symfony\Component\HttpFoundation\StreamedResponse(function()use($pdo){
$tm = new \RV\TProto\Proto\Transmitter\Transmitter(function($data){
echo $data;
}, null, true);
$pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
$res = $pdo->query("SELECT id, status FROM tblclients");
while (false !== ($row = $res->fetch(\PDO::FETCH_ASSOC))) {
$tm->send($row);
}
});