How to assign a looping to code - PHP

Asked

Viewed 37 times

0

I need my reload code every 5 min. How?!

My code it: Opens a Dashboard, inside it has 2 includes. One to access a website and download 3 CSV files and another that accesses these CSV files, takes the values, multiplies and prints the value on the screen.

I need him to repeat the same process every five minutes.

inserir a descrição da imagem aqui

  • That would be equivalent to refreshing the page every 5 minutes?

  • To tell you the truth, I think so. Why would it make the code run again. And with that, repeat the whole process. Yes, it’s feasible.

  • 1

    the javascript setInterval method solves your problem

1 answer

3


You don’t need PHP, really. You can add this code to your header, which will force the page to reload every 300 seconds (5 minutes):

 <meta http-equiv="refresh" content="300" />
  • Thank you! The button was silly, it is because I have this Dashboard in VBA in EXCEL, and there I have a button because the code locks all excel and only for when I press the button, I will edit and delete this button. Thank you :D

  • 1

    Happy to help. The answer has also been edited.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.