T
T
thesirvlad2021-06-28 16:52:56
PHP
thesirvlad, 2021-06-28 16:52:56

How to update data?

I have Api of one site, from it I extract (using php) some data that is updated for example every 3 seconds, so that they are updated on my site, I need to refresh the page, but I need this to happen without reloading.
This is the crux of my question. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Nesterov, 2021-06-28
@thesirvlad

As for php itself, if you need to save data somewhere, then you need to use cron or a task scheduler (I won’t give examples, since I don’t write in PHP anymore).
And if purely for display, use looped ajax requests (as an option - setInterval in jquery)

E
Evgeny Golubev, 2021-06-28
@bestowhope

I'm more confident that the response will be only ajax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question