A little stupid question ... but how to accept a request from vk in json format of the following type
{"type":"confirmation","group_id":000000000} How does php catch this POST request in JSON format?
A little stupid question ... but how to accept a request from vk in json format of the following type
{"type":"confirmation","group_id":000000000} How does php catch this POST request in JSON format?
As I understand you are trying to work with Callback Api , in the same place, on the page below, there is an example in php
... //Получаем и декодируем уведомление $data = json_decode(file_get_contents('php://input')); //Проверяем, что находится в поле "type" switch ($data->type) { //Если это уведомление для подтверждения адреса сервера... case 'confirmation': //...отправляем строку для подтверждения адреса echo $confirmation_token; break; ... Source: https://ru.stackoverflow.com/questions/572365/
All Articles