Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,380
    Thanks
    263
    Thanked 32 Times in 31 Posts

    trap no connection error

    I have an auto submit form in a php file that verifies some remote information from my customer files to my files on my host server.

    I was just thinking what would happen if the power of my host went down, or for some other reason cannot connect. In case that happens i want to trap the no connection error rather than my customer get an invalid verify.

    How do i trap when the auto submit form cannot connect to the action http url. And then show a special message just for that. That way they know its not me its my host thats down.

    i was sort of thinking 408 or 404 trap or maybe even a 503 but it says to handle that as 500, so not sure.
    Last edited by durangod; 08-30-2011 at 10:20 PM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    You cannot. If you're HTML action points at a remote location, there is no interaction on you're part. You need to submit to yourself and use curl or sockets to communicate with the remote script and can determine from that what the results are. If its not 200, there is a problem.

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,380
    Thanks
    263
    Thanked 32 Times in 31 Posts
    its actually my customers html auto form that points to my site on a host shared server, but i think i get what your saying, since im on a shared server there is just no way if its not 200.

    Now if i had my own server and my customers html auto form came to my server then that would be quite dif correct and i could trap that.

    I think i understand..

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Yep, any time the direct connection is severed for whatever reason, there is no way to trap it. Only if you move it from one location to another can it be trapped.

  • Users who have thanked Fou-Lu for this post:

    durangod (08-30-2011)


  •  

    Posting Permissions

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