S
S
slava kk2020-01-18 18:33:46
PHP
slava kk, 2020-01-18 18:33:46

Are there ready-made PHP libraries for working with messages from a personal VK page?

Are there ready-made PHP libraries for working with messages from a personal VK page? Functions for getting a list of messages and sending a message are needed, that is, a bot on a personal page, so to speak.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Minovsky, 2020-01-19
@slavchickalpha

https://github.com/digitalstars/simplevk Bot
example on the user page:

require_once('vendor/autoload.php');
use DigitalStar\vk_api\vk_api;
use DigitalStar\vk_api\LongPoll;
$vk = vk_api::create('login', 'password', VERSION);//или используйте токен вместо лог/пас
$vk = new LongPoll($vk);
$vk->listen(function()use($vk){ //longpoll для пользователя
    $vk->on('message_new', function($data)use($vk) { //обработка входящих сообщений
        $vk->initVars($id, $message);
        $vk->reply($message);
    });
});

A
Alex, 2020-01-18
@Kozack

https://vk.com/dev/PHP_SDK

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question