You are here: Re: [PHP] stream_set_timeout & get_headers (PHP5) « PHP « IT news, forums, messages
Re: [PHP] stream_set_timeout & get_headers (PHP5)

Posted by Marek Kilimajer on 03/07/05 01:13

Chris wrote:
> I'm requesting some remote files to cache on my own server and
> performing a get_headers() first to find out the file type, since I
> don't always know what it is. I've discovered some timeout problems
> with the remote server sometimes and my own script would end up with a
> fatal error because the script took longer to process than 30 seconds.
> Being able to set a timeout would allow me to gracefully recover,
> rather than displaying an ugly error.
>
> I know I can use stream_set_timeout() on fsockopen() if I want to write
> my own get_headers function for < PHP5... but is it possible to set
> the timeout on PHP5's built in get_headers()?
>

ini_set('default_socket_timeout', .... );

 

Navigation:

[Reply to this 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

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