la file_get_contents dovrebbe avere un timeout definito nel php.ini (default_socket_timeout) che di default è di 60 secondi.
Potresti crearti uno stream context ed impostare un timeout maggiore:
Inoltre dovresti anche vedere se non va in timeout anche lo script php, che puoi modificare (se ti è permesso) con la set_time_limit()Codice PHP:
$stream_context = stream_context_create(array('http'=>
array(
'timeout' => 120 // 2 Minuti
)
));
$result = file_get_contents($url,false, $stream_context);