Page 1 of 1

auto refresh every 20 mins

Posted: Thu Jul 13, 2006 12:58 am
by kingdbag
Hey guys,

I tried searching for this and didn't find anything. I just need php to refresh a web page that is loaded every 20 mins until that page is no longer the current page. (So techincally it should refresh every 20 till forever)

I found some javascript that could do it but i'd much rather use php...

Any tips would be appreciated...

Posted: Thu Jul 13, 2006 1:07 am
by Christopher
Use the meta refresh tag in the HTML header.

Posted: Thu Jul 13, 2006 4:26 am
by ok
There are two types of refresh:
1. PHP

Code: Select all

header("Location: http://www.example.com");
This will refresh/redirect immediately (you will see a blank page and then 'http://www.example.com').

2.HTML - Meta Tag (arborint)

Code: Select all

<META HTTP-EQUIV='Refresh' CONTENT='0 ;URL= http://www.example.com '>
The above will refresh every 0 seconds. If you want every 20 seconds to refresh:

Code: Select all

<META HTTP-EQUIV='Refresh' CONTENT='20 ;URL= http://www.example.com '>
Easy!!!

Posted: Thu Jul 13, 2006 9:50 am
by kingdbag
ahhh damn i forgot about the html one... been a long time since I've done any html or php thanks guys!