file_get_contentsを使っていたらタイムアウトでwarningが出たのでこれを改善する。
ignore_errorsとtimeoutを設定すればよい。
timeoutは秒数を設定する。
$context = stream_context_create(array(
'http' => array('ignore_errors' => true, 'timeout' => 10)
));
$json_data = array();
$url = "https://example.com/test.json";
$html = file_get_contents($url, false, $context);