Answer the question
In order to leave comments, you need to log in
What is the best way to receive new messages?
There is a key with the rights to messages. There is a hosting with php, cron (once a minute). New messages need to be stored in the database.
Answer the question
In order to leave comments, you need to log in
When making requests through api, we save the id of the last received message in the self-written cache. Next, with each cron call, we get the dialog using messages.getHistory, where start_message_id = message_id_from_cache.
Then we mark the dialog as read (if needed), add the messages to the database, and update our cache.
If interested, I can give my class for working with the VK API. (But it's also easy to google, just made a very easy one for myself)
Try to force the input and the button to specify the same font (or just both inherit). By default, it is not equal to the body font.
Theoretically, different font and different baseline heights can push apart.
Also, I'd separate the "Enter phone number" caption into a separate block so it doesn't interfere with its baseline.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question