You can simply use the header() function to automatically refresh a page periodically (i.e. at certain time intervals) using PHP. Please, note that header() function must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP script.
The following example will refreshes the current page every five seconds.
Use the
header()FunctionYou can simply use the
header()function to automatically refresh a page periodically (i.e. at certain time intervals) using PHP. Please, note thatheader()function must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP script.The following example will refreshes the current page every five seconds.
need an explanation for this answer? contact us directly to get an explanation for this answer