file_get_contents timeout

Setting the timeout in file_get_content

<?php 
$conf = stream_context_create(array( 
    'http' => array( 
        'timeout' => 1 
        ) 
    ) 
); 
file_get_contents("http://domain.com/rss/", 0, $conf); 
?>

Leave a Reply

Your email address will not be published. Required fields are marked *

*