ezaki113 / vk-callback
Async Callback Server and Api client for rapid VK applications development.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 0
Forks: 0
pkg:composer/ezaki113/vk-callback
Requires
- php: ~7.0
- icicleio/http: ~2.0
This package is not auto-updated.
Last update: 2025-09-25 06:05:41 UTC
README
Async server and client for VK Callback API built on top of Icicle.
INSTALL
composer require ezaki113/vk-callback
TLDR
<?php declare (strict_types = 1); use VkCallback\CallbackServer; use VkCallback\Client; require __DIR__ . '/vendor/autoload.php'; $server = new CallbackServer(); $client = new Client('your token'); $server->confirm('your confirm callback token'); $server->on('wall_reply_new', function (array $data) use ($client) { yield from $client->call('wall.deleteComment', [ 'owner_id' => -$data['group_id'], 'comment_id' => $data['object']['id'] ]); }); $server->run(7070);