<?php require_once 'hit_count.php'; $h = new hit_count(); $h->search = array('list' => 'search_list.txt', 'inquire_list' => 'search_ilist.txt', 'detail' => 'search_detail.txt', 'advertis' => 'search_adv.txt'); $tmp = $h->parse_file(); var_dump($tmp);
system("gzip -d /home/whz/tongji/access_log.{$yesterday}_36.gz"); system("gzip -d /home/whz/tongji/access_log.{$yesterday}_37.gz"); system("gzip -d /home/whz/tongji/access_log.{$yesterday}_39.gz"); $logs = array('/home/whz/tongji/access_log.' . $yesterday . '_36', '/home/whz/tongji/access_log.' . $yesterday . '_37', '/home/whz/tongji/access_log.' . $yesterday . '_39'); #####抓取统计初始化##### $cc = new crawl_count(); $cc->timestamp = $timestamp; $cc->site = 'tootoo'; $cc->crawler = 'Googlebot'; $cc->search_urls = array('buy-', 'd-rp', 'd-c', 'd-p', 's-', 'company'); //$cc->find($log); //$cc->do_result(); //$cc->output(); //$cc->save(); #####点击统计初始化##### $hc = new hit_count(); $hc->timestamp = $timestamp; $hc->site = 'tootoo'; $hc->mark = 'tt?id'; //查找标记 $hc->words = array('list' => 'search_list.txt', 'inquire_list' => 'search_ilist.txt', 'detail' => 'search_detail.txt', 'translation' => 'search_tran.txt'); $hc->parse_words(); //处理关键词列表 //$hc->find($log); //$hc->output(); //$hc->save(); //start foreach ($logs as $file_log) { if (!file_exists($file_log)) { continue; }