[PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Verdon Vaillancourt
Hi :) Given I have some content embedded on my page by calling a remote JS and occasionally the URL for the remote script is down causing my page to be slow or fail, can I use the following example as a means to test and timeout the remote server and skip the embedded JS, if the remote server

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Kevin Stone
Or just fopen() would work fine. -Kevin - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 1:37 PM Subject: [PHP] Test if URL is alive before including a remote JS Hi :) Given I have some content embedded on my page by

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Verdon Vaillancourt
Thanks Kevin, Do I need to include 'fclose ($fp);' in there somewhere in this case? On 7/2/02 3:41 PM, Kevin Stone [EMAIL PROTECTED] wrote: Or just fopen() would work fine. -Kevin - Original Message - Hi :) Given I have some content embedded on my page by calling a remote JS

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Kevin Stone
It's good programming ediquite but not required. All fclose does is destroy the handle which will be lost when the script terminates.. same difference. -Kevin - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent:

Re: [PHP] Test if URL is alive before including a remote JS

2002-07-02 Thread Richard Lynch
Or just fopen() would work fine. Except you can't set the timeout for fopen() and it's incredibly long, isn't it?... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php