Refresh Php Page, But First .....

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Refresh Php Page, But First .....

kvarnerexpress
I'm working on this now, but I can't even think of how to write it, if it's possible (but I'm pretty sure it is)...

I have a page, which has a small iframe on it which loads a php page showing the status of a server, and refreshes itself every 30 seconds or so.. that works fine.. the only problem is, when it refreshes, it seems to take at least 1 second to show anything, and I don't like it going blank like that..

my question is, can I set the php to check the status every 30 seconds, and check to see if it's different from before, and if so, then update the iframe, if not, don't do anything at all?

I don't know php well (but I can work my way through code and figure out what it does) so, I'm hesitant to try anything.. I have a feeling I'll end up not actually checking the server status and just checking if a variable is equal to itself, or something like that.. I dunno. help if ya can thanks!

Reply

xJedix
I, myself am not really good with php.... But I think this is what you would do. Have the script get te status of the server, then have something like

CODE
if($status != !statuscheck)
{
echo('do whatever update to the status of the server here');
}


I'm guessing that would work. I think to get rid of the delay, you would want to get the info then check to see if its the same or not, and then have it post the new info if it is different. Just make sure you have the if statement in the loop you are using to have it check every 30 secs.

Hope it helps, remember I'm not really good at php.....

Reply

OpaQue
If you are refreshing a PAGE, the blank thing will be there. If you want to avoid things like that, then you need a dose of AJAX! This is the same technology which makes pages in GMAIL super duper fast and robust :-)


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.

Recent Queries:-
  1. check for refresh php - 0.54 hr back. (1)
  2. how to check the page has refresh php - 5.44 hr back. (1)
  3. php refresh a php page - 6.69 hr back. (1)
  4. refresh php page - 8.05 hr back. (1)
  5. refresh php - 10.25 hr back. (1)
  6. how to refresh a page in php - 11.21 hr back. (1)
  7. refresh() .php - 11.24 hr back. (1)
  8. refresh its own page php - 15.39 hr back. (2)
  9. ajax force reload php - 22.98 hr back. (1)
  10. php refresh - 0.60 hr back. (2)
  11. php back refresh - 31.97 hr back. (1)
  12. php page refresh - 34.40 hr back. (1)
  13. php refresh page - 34.91 hr back. (1)
  14. how to refresh page when clicking back php - 38.73 hr back. (1)
Similar Topics

Keywords : refresh, php, page

  1. Refresh Main Window By Clicking Link In Popup?
    (2)
  2. Refresh Page After Back Button Hit
    (11)
    Hi. I have a page that is dynamically build through DOM manipulation. So, when I browse outside the
    page, and then click back, those dynamically created DOM objects are gone. Since I am also using JSP
    / Servlet technology, I can rebuild this page easily, which I have done. Here is my dilemma. If
    the user leaves the dynamic page, then clicks back on their browser, I need the page they are going
    back to to refresh. I can't figure out how to do this. I've tried using the META tag, but it
    won't do it. Help would be appreciated. Thanks. ....
  3. Making A Refresh Link On Your Website.
    refresh local webpage (16)
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> post it on ur website
    CODE <a href="javascript:this.location.reload();" style="color:
    #000000; font-weight: normal">refresh</a> It can refresh local webpage. U
    can add it at ur forum so that each topic u are reading can be refresh easily. If ur website
    return to homepage after pressing I.E. refresh button, then u must need this coding. /cool.gif'
    border='0' style='vertical-align:middle' alt='cool.gif' /> Beacus visitors only w....
  4. Auto Refresh
    after page loads (9)
    Okay this seem like a siple enough task, I would like to tell an html page to refresh, but two
    conditions have to be met, 1) the page must have finsihed loading, 2) it must wait a given number of
    seconds, say 5. Buy the way this needs to be automatic. Thanks....
  5. Refresh Web Page
    (6)
    Well this questioned wasnt answered in 2003 but hopefully somebody knows the answer, sorry if this
    is a simple question but can i force the web browser to refresh the page after pressing the submit
    button. Basically my cgi perl form copies a different jpeg with teh same name into my public_html
    folder every time the form is submitted, therefore i have to click on the refresh button in IE to
    see the different picture. I have tried Code: but it doesnt seem to work in IE6 ....

    1. Looking for refresh, php, page

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for refresh, php, page

*MORE FROM TRAP17.COM*
advertisement



Refresh Php Page, But First .....



 

 

 

 

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