labile / vk-longpoll
Bots Long Poll API component
2.1.1
2022-01-01 16:30 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-pcntl: *
- ext-posix: *
- labile/astaroth-contracts: ^1.0
README
Installation
composer require labile/vk-longpoll
Implementation of long polling VK in php
<?php use Astaroth\Longpoll\Longpoll; const ACCESS_TOKEN = "saassasasassssa"; const VK_VERSION = "5.131"; $longpoll = new Longpoll(ACCESS_TOKEN, VK_VERSION); $longpoll->setWait(30); $longpoll->listen(static function($data){ //.... });