SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: PHP Help

Hybrid View

  1. #1
    SitePoint Zealot usmangt's Avatar
    Join Date
    Apr 2009
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Help

    Hi,

    I am making a web application using PHP. I have a script which tells whether the server is up or down. It works fine when i run it. But i need to put this small script in a page and there it should display the output after every 5 minutes whether the server is up or down.

    I don't know how to do this in a web application.

    Kindly help.

    Thank you

    usmangt

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    If the server responsible for generating the message is down, by definition its down and wont be putting out any messages - unless you are monitoring another server.

    Maybe you want Javascript on the browser to check if your server is up or not? If so try these results javascript polling server

  3. #3
    SitePoint Zealot usmangt's Avatar
    Join Date
    Apr 2009
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    well the script is actually a ping script which tell the result. the application will be run in a dedicated server which allows php to work in shell (linux terminal)

  4. #4
    SitePoint Member diginetwork's Avatar
    Join Date
    Oct 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can setup a cron job for server status checking script to run every 5 minutes. This will get the server status every 5 minutes. Then you may have to store this data in a database and display the data in your web application from the db.

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Ah, so you are testing whether Server software such as Apache is down rather than the server itself having gone off line...

    You might be interested in taking up Googles Application Engine (GAE) "free if it does not consume very much" offer, and funnily enough they supply free demo app sourcecode (in Python anyway) Creating a dashboard to monitor a server each 5 minutes.

    http://tutorialzine.com/2011/02/app-...-your-project/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •