Code
Quellcode
- $timeout = 0.9; // 0.9 sekunden
- $url = 'http://www.easy-coding.de';
- $context = stream_context_create(array(
- 'http' => array('timeout' => $timeout)
- ));
- $response = @file_get_contents($url, 0, $context)."";
Info
So weit ich weiß, gilt der Timeout nur für den Verbindungsaufbau.