Beispiel #1
0
 public function format()
 {
     $gps_address = \ipLocation::getInstance()->getaddress($this->wan_ip);
     $wan_gps = \Util::gbkToUtf8($gps_address['area1'] . ' ' . $gps_address['area2']);
     return array_merge($this->stat->format(), array('l4protocol' => strtoupper(getprotobynumber($this->l4protocol)), 'l7prot' => $this->l7prot, 'lan_ip' => $this->lan_ip, 'wan_ip' => $this->wan_ip, 'lan_port' => $this->lan_port, 'wan_port' => $this->wan_port, 'continue_time' => time() - $this->start_time, 'start_time' => (double) sprintf('%u', $this->start_time), 'wan_gps' => $wan_gps));
 }