N
N
Nikita2020-02-26 14:29:39
API
Nikita, 2020-02-26 14:29:39

How to add the current time (and additional parameters) to the sent VK message via api + How to add the pre-source of the link after which the person got to 404?

there is such a script
// in the code I am a teapot

//Отправляем сообщение в ВК
$domain = "266212779"; //Доменное имя получателя сообщения в ВК
$token = "0000000000000000000"; // Тут укажите ВАШ токен от приложения ВК
$sbormess = "<br>__ ▂ ▃ ▅ ▇ █ 。◕‿ ◕。 █ ▇ ▅ ▃ ▂ __<br>Привет! На сайте появилась ошибка 404<br>Проверь пожалуйста<br>Источник:  ".$_SERVER['REQUEST_URI']."<br>Время: ".$datetime."<br>[ ▇ ▃ ▄ ▅ █ ▇ ▂ ▃ ▁ ▄ ▅ █ ▅ ▃ ▇ ]".$message; // Скрепляем содержимое формы в одну переменную
$query = file_get_contents("https://api.vk.com/method/messages.send?user_id=".$domain."&message=".urlencode($sbormess)."&v=5.69&access_token=".$token);
$url = "http" . (($_SERVER['SERVER_PORT'] == 443) ? "s" : "") . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

How to send the time when an error occurred in a VK message?
I've already googled the whole google - nothing fits (
It's also interesting whether it is possible to transfer the original link (i.e. page) to the message,
now the script sends the link (it has an intermediate page with a timer) on which the user went, but I wonder what would be transmitted page (link) on which there is a link on which the user goes
Is it possible to transfer the type of device?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question