FORBIDDEN pages!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DJuse
    Forum Member
    • Apr 2006
    • 72

    FORBIDDEN pages!

    Hello guys/Girls.
    I have a question.

    If i have an application that connect to the internet and show content from a website, how can i make so that if the server is down my application do not show the FORBIDDEN or PAGE NOT FOUNT Internet Explorer default page?
    I would like that if the server is down the application show a local page inside the application!
    Is this possible?

    An example or piece of code will be appreciate!
    Thanks for the help in advance.
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #2
    Here, short and sweet

    isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
    if isLive then
    -- the webpage is online so load the page
    else
    --the webpage is offline so do something else
    end
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • TristanD
      Forum Member
      • Oct 2006
      • 314

      #3
      isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
      if isLive then
      -- the webpage is online so load the page
      else
      --the webpage is offline so do something else
      end

      ** it should be

      isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
      if isLive == true then
      -- the webpage is online so load the page
      else
      --the webpage is offline so do something else
      end

      Comment

      • RizlaUK
        Indigo Rose Customer
        • May 2006
        • 5552

        #4
        i think you will find (someone correct me if im wrong)

        isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
        if isLive then
        -- the webpage is online so load the page
        else
        --the webpage is offline so do something else
        end
        and


        isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
        if isLive == true then
        -- the webpage is online so load the page
        else
        --the webpage is offline so do something else
        end
        both return the same result

        the same as

        isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
        if not isLive then
        --the webpage is offline so do
        else
        -- the webpage is online so load the pagesomething else
        end
        would return the same as

        isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
        if isLive == false then
        --the webpage is offline so do
        else
        -- the webpage is online so load the pagesomething else
        end
        or

        isLive = HTTP.TestConnection("http://www.yourwebsite/myscript.php", 20, 80, nil, nil);
        if isLive ~= true then
        --the webpage is offline so do
        else
        -- the webpage is online so load the pagesomething else
        end
        its just a formatting thing
        Last edited by RizlaUK; 01-17-2007, 01:38 PM.
        Embrace change in your life, you never know, it could all work out for the best

        Comment

        • AudioSam
          Indigo Rose Customer
          • Jan 2007
          • 272

          #5
          Hello RizlaUK

          Can you send me an Email Address Pvt?
          I have something to send you.
          Thanks Sam

          Comment

          • TristanD
            Forum Member
            • Oct 2006
            • 314

            #6
            ok, i didn't know if it matterd

            Comment

            • RizlaUK
              Indigo Rose Customer
              • May 2006
              • 5552

              #7
              ok, i didn't know if it matterd
              it kind of confused me to start with, i was thinking "what one do i use" but ir made ams with a kind of freelance coding style, plus you need to use differant ways of doing the same thing in order to make complicated functions (wich im slowly getting to grips with, lol)
              Embrace change in your life, you never know, it could all work out for the best

              Comment

              • DJuse
                Forum Member
                • Apr 2006
                • 72

                #8
                Thank you very much guys.
                I't work great...!

                I was using this one and also work fine!
                connected = HTTP.TestConnection("http://www.mysite.com", 20, 80, nil, nil);

                if connected then

                Comment

                • DJuse
                  Forum Member
                  • Apr 2006
                  • 72

                  #9
                  Sam. PM have been send!

                  Comment

                  Working...
                  X