Answer the question
In order to leave comments, you need to log in
Is VK Bot in php possible without cron?
There is a simple php bot that sends all incoming messages to me in telegram. Now it all works on the crown with a minute launch. The question actually is, can I do without krone? Maybe VK has a server that runs a script when it comes in?
Answer the question
In order to leave comments, you need to log in
vk-io (running node) has a long pull and event processing system. PHP is not the best choice for bots
Roman , why cron has a much easier solution. If you need to be notified when there are new events in a group, the solution is to handle those events. For each event type message_new, wall_post_new, etc. write a call to the telegram api to send you a message.
$TGMtoken = '111111:000000000000';
$TGMapi = 'https://api.telegram.org/bot'.$TGMtoken.'/';
file_get_contents($TGMapi . 'sendMessage?chat_id=000(ваш телеграм)&text=Сообщение от пользователя в группе);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question