Script Hanging - Display Alternate Page

Discussion in 'PHP' started by timallard, Sep 12, 2008.

  1. #1
    Hello,

    I have a script running on a very high traffic website. The script reads an RSS feed from a remote site and displays on the high traffic site.

    Right now the site that is syndicating, keeps failing, thus hanging my script.

    Is there a way for my script to tell if its hanging, and then display an alternate page?

    e.x.

    if RSS fails, display static content rather than 3rd party syndicated.

    Thanks!
     
    timallard, Sep 12, 2008 IP
  2. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #2
    It depends what method you are using to grab the content.

    You should be able to adjust it so that it uses a timeout parameter and then if that limit is reached display the alternate page.

    You would need to show us how you are getting the data before we can tell you the best way forward.
     
    SilkySmooth, Sep 12, 2008 IP