Jump to content

"Is URL responding" function? (check to see if URL is responding...)


colombian

Recommended Posts

This should be easy, but I cannot figure out how to phrase to question properly to get an answer in Google.

 

My page calls an iframe (I would rather it not, but got no choice). Sometimes, the iframe is VERY VERY slow, other times unavailable. I want to display an error/sorry message if the iframe is unavailable, or display the actual iframe if all is fine.

 

How would I go about that?

 

in psudo-code:

 

$url = "this-never-changes.iframe";

// INSERT special-php-function-to-check-url

if (URL available) {

// iframe code all over here

}

else {

echo "Sorry this section is temporarily unavailable";

}

 

Any help would be appreciated - thank you.

 

 

 

Link to comment
Share on other sites

I don't really want 1400+ lines of code plus additional packages for this functionality though.

 

My checks through ping functions has lead me to the following error in PHP:

----

Warning: fsockopen() [function.fsockopen]: unable to connect to https://REMOVED.security (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in SERVER_PATH/iframe-test.php on line 51

---

 

I don't have control of the PHP server - is that  a clear indication I won't be able to use the fsockopen function?

Link to comment
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.