How can I set time limit on get_file_contents in PHP?
<p>At times the get_file_contents takes too long and that hangs the entire script. Is there any way of setting a time out limit on get_file_contents, without modifying the maximum execution time of the script?</p>

<h1>Edit:</h1>

<p>Its taking long because the file does not exist. I am getting "failed to open stream: HTTP request failed!" error. But it takes forever.</p>
