Re: simpleXML - simplexml_load_file() timeout?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-04-10 at 20:52, darren kirby wrote:
> quoth the Richard Lynch:
> > Perhaps, then, you should:
> > maintain a list of URLs and acceptable "age" of feed.
> > Attempt to snag the new content upon visit, if the content is "old"
> > Show the "old" content if the feed takes longer than X seconds.
> 
> I really do like this idea, as I would rather use an old feed than just print 
> "Feed unavailable" as I have it now.
> 
> > You'll STILL need a timeout, which, unfortunately, means you are stuck
> > rolling your own solution with http://php.net/fsockopen because all
> > the "simple" solutions pretty much suck in terms of network timeout.
> >
> > :-(
> >
> > It would be REALLY NIFTY if fopen and friends which understand all
> > those protocols of HTTP FTP HTTPS and so on, allowed one to set a
> > timeout for URLs, but they don't and nobody with the skills to change
> > that (not me) seems even mildly interested. :-( :-( :-(
> 
> I am interested, but I don't have the skills either...
> 
> > Since I've already written a class that does something like what you
> > want, or maybe even exactly what you want, I might as well just
> > provide the source, eh?
> >
> > http://l-i-e.com/FeedMulti/FeedMulti.phps
> 
> Thanks for that, it looks like interesting code, if not a little over my head. 
> I am just a duffer here. I will certainly play with it some more. As for 
> curl, I realized I didn't add curl support myself, so I am rebuilding PHP 
> now... 
> 
> When I do get something figured out I will post results here. Problem is, with 
> either method I need to find a feed that is slow to test with. If I test it 
> with a bunk url it will just 404 immediately right? Is there a way to 
> simulate a slow connection?

For sure ;) Pull your ethernet cable out. Doesn't get much slower :D

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux