You are here: Re: Testing if a server is running with almost no permissions « PHP Programming Language « IT news, forums, messages
Re: Testing if a server is running with almost no permissions

Posted by Colin McKinnon on 01/12/06 23:08

Simon wrote:

>>
>> The problem isn't file() or fopen(), but include() and require().
>
> No, it has nothing to do with include() or require().
> They are not even used for the same thing.
>

Yes it does - they all use the same underlying code for reading files.

The best solution would be to use curl lib fns in PHP (you can set a
timeout).

> The problem is that I am trying to use fopen(...) or file(...) to read the
> content of another site but if that site is down then they simply don't
> return.
>

So decouple this process from the process which presents the results. Spawn
it off in the back ground and set it to communicate with the reporting
process (e.g. by dropping a copy of the data on the local filesystem) when
succesful

> I want a way, (other than system(...) and shell_execute(...)), to test if
> a domain is up.
>

A domain? Are you sure that is what you mean?

C.

 

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

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