How To Autorefresh A Page Every Two Minutes?

Pages: 1, 2
free web hosting

Read Latest Entries..: (Post #19) by iGuest on Jan 23 2008, 06:57 PM. (Line Breaks Removed)
Replying to Trap FeedBackerThats really good. But ending of tag is not improper. :-)-reply by sangeeta kumar
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > CONTRIBUTE > 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.

 

 

 


Reply

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

Reply

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.

Reply

electriic ink
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!

Reply

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.

Reply

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.

Reply

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');


Reply

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

Reply

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">

Reply

electriic ink
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

Reply

Latest Entries

iGuest
Replying to Trap FeedBacker

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

-reply by sangeeta kumar

Reply

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

Reply

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

Reply

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.

Reply

Mike
QUOTE(karlo @ May 2 2005, 12:06 PM)
Are you really sure that PHP has a refresh? Do you have a proof? Do you have a website that uses that method? Well, some Ad Remover software, like Ad Muncher, sometimes the user disables META Redirect.
*



That explains why you looked stupid on my site when you said that the shoutbox was ugly, and that the boards had a bad layout. Your shoutbox is really bad, in my opinion. But nonetheless, you said mine wasn't good and you didn't even bother to check it out. If you checked it out, you would have noticed that it refreshes every 5 seconds. And it uses the header() method.

CODE

// What's at the top of my shoutbox.php page:

header('Refresh: 5');

Reply



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*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. auto refresh php - 4.28 hr back. (1)
  2. how to auto refresh a page - 4.41 hr back. (1)
  3. auto refresh with php - 6.44 hr back. (1)
  4. autorefresh page - 10.76 hr back. (1)
  5. auto refresh page php - 14.10 hr back. (1)
  6. auto refresh hotmail page - 15.44 hr back. (1)
  7. php auto refreshing - 16.72 hr back. (1)
  8. auto refresh page script in php - 20.40 hr back. (1)
  9. ie auto refresh disable - 23.98 hr back. (1)
  10. intitle:how to setup auto refresh on website html - 26.68 hr back. (1)
  11. php autorefresh - 31.95 hr back. (2)
  12. auto refresh page - 5.57 hr back. (12)
  13. meta refresh page every 3 or 5 minuters - 38.45 hr back. (1)
  14. autorefresh php - 11.22 hr back. (5)
Similar Topics

Keywords : autorefresh, page, minutes

  1. Links To Lots Of Usefull Website
    I AM NOT SPAMING THIS TOOK ME 15 MINUTES (1)


      Looking for autorefresh, page, minutes

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for autorefresh, page, minutes

*MORE FROM TRAP17.COM*
advertisement



How To Autorefresh A Page Every Two Minutes?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE