Jump to content

Fopen Timeout Problem


poddys

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.