hi can anyone give me a link on tutorials to determine if site is up or down, if it's http or https. thanks.

    get_headers() check for 200, 302 etc

      6 days later

      thanks for the get headers part but how do u determine if a site is up or down? I have this project which monitors alot of sites,domains, if they are down then the system will automatically email the admin that the certain site is down

        so correct me if i'm wrong but the flow is like this :

        1. get_headers();
        2. if it returns 404 then that site,server,domain,access point is down
          -else its up?

        wow never knew it was that simple, sorry if I had to ask instead of trying first,i just want to make sure, I just crashed our server the other day with some mistakes i commited dont want to get fired eheheh thanks.

          If get_headers() returns a 404 response, then the site is "up", but the URL you requested couldn't be found.

          If get_headers() returns boolean FALSE, then the server itself is down.

            Write a Reply...