0
ようこそ!質問があります。私はこのような何か持って、HTMLでの復帰にJsonデータ表示 - css、html
<?php
$url = "http://services.faa.gov/airport/status/LAX?format=json";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 4);
$json = curl_exec($ch);
if(!$json) {
echo curl_error($ch);
}
curl_close($ch);
print_r(json_decode($json));
?>
:
stdClass Object ([delay] => false [IATA] => LAX [state] => California [name] => Los Angeles International [weather] => stdClass Object ([visibility] => 10 [weather] => Overcast [meta] => stdClass Object ([credit] => NOAA's National Weather Service [updated] => 9:53 PM Local [url] => http://weather.gov/) [temp] => 54.0 F (12.2 C) [wind] => East at 12.7mph) [ICAO] => KLAX [city] => Los Angeles [status] => stdClass Object ([reason] => No known delays for this airport. [closureBegin] => [endTime] => [minDelay] => [avgDelay] => [maxDelay] => [closureEnd] => [trend] => [type] =>))
をそして今、私の質問は、CSSでそれをスタイリングする方法である今日、私はURLからJSON APIを取得しようと、私はこのコードを持っていますあなたが使用する場合と