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 Erwin Moller on 01/12/06 17:01

Simon wrote:

>>
>> I think you cannot if your provider is so strick.
>> I wonder why they are so afraid of file() and fopen().
>> Maybe they have something to hide, like the fact that they don't know how
>> to
>> set up PHP properly. :-/
>> You can always switch provider of course.
>>
>> Regards,
>> Erwin Moller
>
> I don't understand?
> file() and fopen() has nothing to do with them, (i think).
>
> That's just the way php works.
>
> There must be a way of testing if a domain is "online" or "offline".
>
> Simon

Probably it is me who doesn't understand. :P

In your original post you wrote this:
------------------------------
I have tried

fsockopen("http://www.example.com", 80, $errno, $errstr, 1);
//and
file( "http://www.example.com")
//
fopen( ..., "r" );

But that does not work
------------------------------

So I thought your provider was blocking that functionality.

But You probably mean that they are working, but you cannot use the timeout
on them? right?

Nevermind, I am always slow on workingdays. :P

And sorry: If that is your problem, I don't know the answer.

However the manual says this:

http://nl3.php.net/manual/en/function.fsockopen.php
----------------------------------------------
Note: If you need to set a timeout for reading/writing data over the
socket, use stream_set_timeout(), as the timeout parameter to fsockopen()
only applies while connecting the socket.
-----------------------------------------------

Does that help?


Regards,
Erwin Moller

 

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

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