Jump to content

Recommended Posts

I have a system that runs under Localhost and which uses Fopen to connect to an online system when the user logs in.

 

If there is no internet connection, the Fopen fails immediately and the script catches that perfectly.  If there is internet connection and the url is found, it is executed fine.

 

The problem I am having is where there is an internet connection, but the url is not available, which happens if the user is using the wrong connection while in the office.  In this case, the browser waits for about a minute, then gives a 500 error (MSIE).

 

Is there an easy way to set a shorter timeout for this, so if the site/url cannot be found, the command fails?

 

The reason for having the offline system is for engineers who have to create reports, but are often in environments where there is no network connection.  They work offline and then upload the reports to the online system.  As part of the login process, a script is run to download updates to tables, which only takes place if they are online of course.

Link to comment
https://forums.phpfreaks.com/topic/267813-fopen-timeout-problem/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.