PHP Custom timeout for file_get_contents
$CustStreamContext = stream_context_create
(
array
(
'http'=> array
(
'timeout' => 0.5, //0.5 seconds
)
)
);
$Cont = @file_get_contents("https://www", false, $CustStreamContext);
(
array
(
'http'=> array
(
'timeout' => 0.5, //0.5 seconds
)
)
);
$Cont = @file_get_contents("https://www", false, $CustStreamContext);
Comments
Post a Comment