Re: XML_RSS time out question

From: Date: Mon, 06 May 2002 10:07:08 +0000
Subject: Re: XML_RSS time out question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1347@lists.php.net to get a copy of this message
Thanks Jesus, Please would the following be correct ? $so = fsockopen ("www.mypartnersite.com", 80, $errno, $errstr, 10); if ($so){
    $fo = @fopen ("http://www.mypartnersite.com/backend.php", "r");
     if($fo){
      require_once "XML/RSS.php";
      $rss =& new XML_RSS($fo);
      $rss->parse();
      $items = $rss->getItems();
      $smarty->assign('items', $items);
      }
} } Luc At 18:07 05/05/2002 -0700, Jesus M. Castagnetto wrote:
To avoid this problem, you could open a socket connection and then get the data from the remote server. Then pass the data to XML_RSS. I am not sure if it is a good idea to include timeout/socket connections in that class, which is intended for parsing RSS. HTH --- Luc Saint-Elie <luc@saint-elie.com> wrote: Hello, I'm a happy user of XML_RSS except on one point : require_once "XML/RSS.php"; $rss =& new XML_RSS("http://www.mypartnersite.com/backend.php"); $rss->parse(); $items = $rss->getItems();..and so on.... If http://www.mypartnersite.com is out, my own site is stuck Is there away to set some kind of time out ? Thanks in advance Luc


« previous php.pear.general (#1347) next »