php-general | 2001092
Date: 09/30/01
- Next message: Armando Cerna: "Re: [PHP] Running a Shell Script in PHP HELP!"
- Previous message: Matt Greer: "Re: [PHP] Running a Shell Script in PHP HELP!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You can't set any timeout when using the file() function
if you use fsockopen() you can also use socket_set_timeout().
Read more at
http://php.net/manual/en/function.fsockopen.php
http://php.net/manual/en/function.socket-set-timeout.php
- Frank
> Hi,
>
> set_time_limit() and max_execution_time() wont work on this script.
>
> $url = "http://www.example.com";
> $file = implode('',file($url));
> if(!$file)
> {
> print("error");
> }
>
> My question is how can I make the script time out if the server where I want
> to connect to is busy. Now the script will time out after 30 (default)
> seconds. I want to connect, if the server is busy then a message "server
> busy" should appear but not after 30 seconds!
>
> I'm not working local so I can't change the default 30 sec.
>
> Thanks very much!
> Roel
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe <email protected>
> For additional commands, e-mail: php-windows-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Armando Cerna: "Re: [PHP] Running a Shell Script in PHP HELP!"
- Previous message: Matt Greer: "Re: [PHP] Running a Shell Script in PHP HELP!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

