function get_all_hashtags() { // check all known hashtags $db =& $GLOBALS['db']; $twitter =& $GLOBALS['twitter']; $res = $db->query('select tag from hashtags'); $data = array(); $count = 0; while ($tag = $res->fetch_assoc()) { $data[$tag['tag']] = $twitter->searchRealtime($tag['tag']); $count++; if ($count % 100 == 0) { log_search($data); unset($data); } } log_search($data); unset($data); }
/*=========================================*/ /* 初期化 */ /*=========================================*/ //配列 初期化 $main = array(); //表示用配列 初期化 $main_view = array(); //一致数 $view_no = 0; /*=========================================*/ /* データ編集 */ /*=========================================*/ if (is_array($data) && $_POST["search_w"] != "") { foreach ($data as $v) { unset($tmp); $tmp = log_search($v, $_POST["search_w"], $_POST["search_op"]); if ($tmp) { if ($view_max && count($main) < $view_max) { $main[] = $v; $main_view[] = $tmp; } $view_no++; } } unset($data); unset($tmp); } /*=========================================*/ /* メイン処理 */ /*=========================================*/ if ($_POST["search_w"] != "") {