Nov 21, 2009
Pages: 1, 2, 3

How To Autorefresh A Page Every Two Minutes?

free web hosting

Read Latest Entries..: (Post #20) by iGuest on May 16 2009, 06:20 PM.
Auto Refresh How To Autorefresh A Page Every Two Minutes? you can just us http://www.Refreshthis.Com to auto refresh your page!
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > MODERATED AREA > Computers > Programming Languages > PHP Programming

How To Autorefresh A Page Every Two Minutes?

leiaah
I'm working on an OFFLINE SYSTEM that uses PHP and MySQL. Something that can be used by a small network of PC's to do transactions. These are problems I need to solve:

1] I need A CODE THAT REFRESHES THE PAGE EVERY TWO OR SO MINUTES. That way the new entries in the database gets seen on the page and I don't have to press F5 or click refresh everytime.

2] How do you set CHMOD PERMISSIONS WHILE USING APACHE AS MY SERVER (OFFLINE)?

Is the idea of an OFFLINE SYSTEM sounds garbage? Is it okay to use it for transactions within a small network? SUGGESTIONS WOULD BE HIGHLY APPRECIATED. Thanks in advance smile.gif

Notice from Johnny:
Topic title change per request of owner.

 

 

 


Comment/Reply (w/o sign-up)

leiaah
QUOTE
Is the idea of an OFFLINE SYSTEM sounds garbage?

My grammar is wrong, sorry...should be "DOES the idea...SOUND (no 'S')" dry.gif

Comment/Reply (w/o sign-up)

mobious
you could just add a refresh meta in the page that would be refreshed. the idea of an offline system is just right for you because no one will be using your system outside of your personal network.

Comment/Reply (w/o sign-up)

cmatcmextra
Sounds like someone's making things too difficult smile.gif

It's easier to just use meta refresh - but on the other hand php refresh would mean more people would have the page refreshed. Why? Because you can disable it in most browsers!

Anyway, here's the code:

<meta http-equiv="refresh" content="120;url=index.php">

120 represents 120s (2 minutes) and index.php represents the page you wish to refresh!

Comment/Reply (w/o sign-up)

mobious
PHP also has no other way of refreshing a page other than a meta refresh. so just let it be. just blame them for disabling it.

Comment/Reply (w/o sign-up)

wariorpk
Thanks alot cmatcmextra that was a extrememly good explination. Now if I ever need to auto refresh a page I know where I should go.

Comment/Reply (w/o sign-up)

Mike
Actually mobious, you are incorrect. PHP does have a way to refresh a page. Put this at the top of your page *BEFORE* the <head> tag.

CODE


header('Refresh: 120');



If you want it to refresh to a different link, put this:

CODE


header('Refresh: 120; url=PAGEYOUWANTTOREFRESHTO');


Comment/Reply (w/o sign-up)

badinfluence
here are a few, yo might interested..

META-Refresh
simple html meta refresh and why?

Java scripts
Auto refresh page with timer
Auto-Refresh:fixed timer

PHP
Smart Auto Refresh

for chmod, find out here
actually, there are lot of others, if you will use Google search!!
smile.gif

Comment/Reply (w/o sign-up)

karlo
It's easy. I suggest you use JavaScript, because it's the modern way biggrin.gif

CODE
<script language="javascript" type="text/javascript">setTimeout("location.reload();",20000);</script>


The code above reloads/refreshes the current page every 2 minutes. Also this code (the old way):

CODE
<meta http-equiv="refresh" content="120">

Comment/Reply (w/o sign-up)

cmatcmextra
QUOTE
it's the modern way


It may be the modern way but people still have javascript disabled even if they don't want it to. An annoying virus may come along and disable it for them. There are a lot of idiots out there who don't know how to adjust security settings.

Also it's harder to remember. If I had to do it anyway out of those 3, I'd use php because it will refresh for everyone regardless

Comment/Reply (w/o sign-up)

Latest Entries

iGuest
Auto Refresh
How To Autorefresh A Page Every Two Minutes?

you can just us http://www.Refreshthis.Com to auto refresh your page!


Comment/Reply (w/o sign-up)

iGuest
Replying to Trap FeedBacker

Thats really good. But ending of tag is not improper. :-)

-reply by sangeeta kumar

Comment/Reply (w/o sign-up)

iGuest
you can use this also
How To Autorefresh A Page Every Two Minutes?

//Define on page at top
<?php
$timer = 120;
$title = "Sania Mirza Gallery";
$gid = 120;
$url = $_SERVER['PHP_SELF'].'?id='.$gid;
?>
//define in <body> TAG

Echo '<META HTTP-EQUIV="Refresh" CONTENT="'.$timer.'; URL='.$url.'" />';

//Define at user end or on page


Echo " <small>Self Refresh- $timer Secs</small><br/>\and";

Cheers,
Abhi


-reply by Abhijeet

Comment/Reply (w/o sign-up)

iGuest
Yup, agree with electriic ink. And furthermore, the html one is easier and simpler. But there's 1 thing which I am concern about. Does all browsers support that...??

-jumper_twh

Comment/Reply (w/o sign-up)

snlildude87
I'm going to close this thread before karlo comes and starts bickering, and everyone will start flaming each other. Besides, the problem seems to be solved anyway.

Thread closed.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2, 3

Searching Video's for autorefresh, page, minutes
See Also,
advertisement


How To Autorefresh A Page Every Two Minutes?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com