Re: handle file_get_contents timeout including dns lookup time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 14.02.12 14:55, schrieb Matijn Woudt:
On Tue, Feb 14, 2012 at 1:28 PM, nik600 <nik600@xxxxxxxxx> wrote:

******* server.php ******* placed on www.foo.com at
http://www.foo.com/server.php
<?php
sleep(15);
echo "OK";
?>

I don't think this is possible with file_get_contents, but it should
work if you use cURL and set the CURLOPT_CONNECTTIMEOUT option.

- Matijn
That won't help. When you reach the sleep with your request, the connection is already established.
What you want is curl with

CURLOPT_TIMEOUT     max execution time


-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: marco@xxxxxxxxxx

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux