K
K
Kirill Zhilyaev2016-10-27 18:00:55
PHP
Kirill Zhilyaev, 2016-10-27 18:00:55

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

3 answer(s)
U
Uno, 2016-10-27
@Noizefan

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)

D
dom1n1k, 2016-12-24
@dom1n1k

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.

L
lacrim, 2016-12-24
@lacrim

Sometimes I catch a similar bug in some CMS. Usually solved with vertical-align:top; either at the parent tebo at the button,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question