Exemplo n.º 1
0
function log_news_query($symbol, $timeRequest)
{
    $symbol = get_symbol_name($symbol);
    $currentTime = time();
    $fd = fopen("./logs" . $symbol, "a+");
    $ret = fwrite($fd, date("H:i:s m.d.y", $currentTime) . " {$symbol} at " . date("H:i:s m.d.y", $timeRequest) . "\n");
    fclose($fd);
}
Exemplo n.º 2
0
function generate_output($symbols, $time)
{
    $var = "";
    foreach ($symbols as $s) {
        $sym = get_symbol_name($s);
        $var .= "{$sym}>";
        $var .= print_news($s, $time);
        $var .= "\n";
    }
    apc_add("key:" . $time, $var);
    echo $var;
}