Reply to Re: [PHP] pulling content from a URL

Your name:

Reply:


Posted by Matthew Fonda on 03/05/05 01:42

I would recommend using PEAR::HTTP_Request for this. It does exactly
what you want to do, and can handle error handling very well

http://pear.php.net/package/HTTP_Request

> I'm writing a script that needs to put the contents of an external URL
> into a variable. I need to include some sort of error checking that
> will kill this request if for some reason the URL request hangs for
> more then 15 seconds. In researching this, I think the correct
> function to use is fsockopen, but I can't seem to get it to work. Can
> someone verify if fsockopen is the best way to grab an external URL,
> but kill the request if it hangs for a certain amount of time ... and
> if so, show me some sample code on how to place this URL's contents
> into a variable that I can then parse. The URL will be hard coded into
> the script, so I don't need a lot of error checking to insure correct
> URL format, etc.

--
Regards,
Matthew Fonda
http://mfonda.info

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация