file get contents timeout

Solutions on MaxInterview for file get contents timeout by the best coders in the world

showing results for - "file get contents timeout"
Jan
04 Jul 2019
1$ctx = stream_context_create(array('http'=>
2    array(
3        'timeout' => 1200,  //1200 Seconds is 20 Minutes
4    )
5));
6
7echo file_get_contents('http://example.com/', false, $ctx);