Jul 25, 2008

Refresh Php Page, But First .....

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

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.
Confirm Code:

Recent Queries:-
  1. refresh php - 6.05 hr back. (1)
  2. php check refresh - 6.28 hr back. (1)
  3. refresh button in php - 11.17 hr back. (1)
  4. how to refresh a php page through code - 20.40 hr back. (1)
  5. return to middle of page when refresh - 25.11 hr back. (1)
  6. php script to refresh the page - 30.42 hr back. (1)
  7. after post back check refresh in php - 31.62 hr back. (1)
  8. php check if refreshed - 37.90 hr back. (1)
  9. php, refresh - 41.22 hr back. (1)
  10. refresh $ php code - 46.62 hr back. (1)
  11. php refresh page - 47.40 hr back. (3)
  12. free code how to dynamically refresh the php page - 51.08 hr back. (1)
  13. on back refresh php - 53.01 hr back. (1)
  14. php page refresh - 58.08 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

Searching Video's for refresh, php, page
advertisement



Refresh Php Page, But First .....



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
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