labile/vk-longpoll

Bots Long Poll API component

2.1.1 2022-01-01 16:30 UTC

This package is auto-updated.

Last update: 2024-11-09 15:20:29 UTC


README

GitHub license Packagist Stars Packagist Stats

Документация на русском языке

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){
//....
});