Skip to content

Instantly share code, notes, and snippets.

@halka
Created May 2, 2009 08:03
Show Gist options
  • Save halka/105464 to your computer and use it in GitHub Desktop.
Save halka/105464 to your computer and use it in GitHub Desktop.
jsonをdecodeしてコールサイン一覧を表示
<?php
require_once 'HTTP/Request.php';
$url='http://exp.rw12.net/vatsim_new/gen_json.php';
$req=& new HTTP_Request($url);
$req->sendRequest();
$res=$req->getResponseBody();
$decoded=json_decode($res,true);
//list of online
echo "<ul>\n";
foreach($decoded as $data){
echo "<li>".$data[0]."</li>\n";
}
echo "</ul>\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment