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.
[Back to original message]
|