<?php

require_once "../php/main.php";
$id = argreq("id");
$code = argreq("code");
if (check_ticker_passcode($id, $code)) {
    api_done(array("ticker" => get_ticker($id)));
}
api_error();
<?php

require_once "../php/main.php";
$id = argreq("id");
$time = get_current_time($id);
if (is_null($time)) {
    api_error();
}
api_done(array("half" => $time[0], "time" => $time[1], "overtime" => $time[2]));