<?php if (basename(getcwd()) == 'bin') { chdir('..'); } include_once 'lib' . DIRECTORY_SEPARATOR . 'generator.php'; $config = prepare_config(); $models = prepare_models(); $views = prepare_frontend(); generate_output($config, $models, $views);
return true; } return false; } function init_env($time) { chdir("/home/crowler/"); init_db(); $symbols = find_symbols_list(); add_debug($time); return $symbols; } 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; } $time = isset($_GET["time"]) ? $_GET["time"] : 0; if (try_cache($time) == true) { return; } $symbols = init_env($time); generate_output($symbols, $time);