#key - PHP : voici donc ma nouvelle fonction de récupération de page web en PHP - Le Hollandais Volant
function get_external_file($url, $timeout=10) {
	$context = stream_context_create(array('http'=>array(
			'user_agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0 BlogoText-UA) Gecko/20100101 Firefox/28.0',
			'timeout' => $timeout,
			'ignore_errors' => TRUE
		))); // Timeout : time until we stop waiting for the response.
	$data = file_get_contents($url, false, $context, -1, 4000000); // We download at most 4 Mb from source.
	if (isset($data) and isset($http_response_header[0]) and (strpos($http_response_header[0], '200 OK') !== FALSE) ) {
		return $data;
	}
	// if file_get_contents fails (due to server restrictions regarding bots), try with cUrl (more powerfull, but not native PHP and heavier) :
	elseif (extension_loaded('curl')) {
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$data = curl_exec($ch);
		curl_close($ch);
		return $data;
	}
	// otherwise fails by returning an empty array.
	else {
		return array();
	}
}