Public function Line ($config, $qq = ", $data =array ()) {$array = array (); $line = $config [' line ']; $url = Trim ($config [$line] if ($line = = ' Oneline ' && $qq! = ') {$content = $this->progetcont ($url. ' /index.php?m=account&c=index&a=search&q= '. $qq);p Reg_match_all ('/([\s\s]*?) <\/tr>/i ', $content, $pregArray), if (count ($pregArray)) {foreach ($pregArray [0] as $value) {Preg_match_all ('/
/I ', $value, $v); $ipVal = $this->strsub ($v [0][3], ' fa ' > ', '$ipid = M (' iplib ')->where (' Ipval = \ '. $ipVal. ' \ ')->find () [' ID '];if (! $ipid) {$ipid = M (' iplib ')->add (Array (' ipval ' = = $ipVal, ' namelist ' = ' 1 '));} $timsInt = Strtotime ($this->strsub ($v [0][4], ' fa ' > ', '$boolTure =true;foreach ($data as $d) {if ($d [' jbtime '] = = $timsInt) && ($ipid = = $d [' Jbip '])) {$boolTure = false;}} if ($boolTure | | count ($data) ==0) {$array [] = Array (' jbip ' = = $ipid, ' jbtime ' = + $timsInt, ' number ' + $qq, ' class ' = > ' 1 ', ' type ' = ' 4 ', ' whitelist ' = ' 0 ');}} $rel = M (' number ')->addall ($array);}} if ($line = = ' Twoline ') {$number = '; $class = ' 1 '; if ($qq! = ") {if (!is_numeric ($QQ) | | (Strlen ($QQ) < 5) | | (strlen ($QQ) > 13)) {$this->error (' The QQ number you queried is malformed! '); return $data;} $content = $this->progetcont ($url. ' /form.php ', ' qq= '. $qq); $number = $QQ;} if ($content) {$type = M (' type ')->select (), $typeArray = Array (), foreach ($type as $v) {$typeArray [Trim ($v [' name '])] = $ v[' id '];} Preg_match_all ('/{([\s\s]*?)} /I ', $content, $pregArray), if (count ($pregArray)) {foreach ($pregArray [0] as $k = + $value) {$ipVal = $this->strsub ($ Value, ' Myip ': ', ', ' Date '), $ipVal = Str_replace (' "', ' ', $ipVal), $ipid = M (' iplib ')->where (' ipval = \ ') $ipVal. ' \ ')->find () [' ID '];if (! $ipid) {$ipid = M (' iplib ')->add (Array (' ipval ' = = $ipVal, ' namelist ' = ' 1 '));} $timsInt = Strtotime ($this->strsub ($value, ' Date ': "', '", "TypeText ')"), $boolTure =true;foreach ($data as $d) {if ($d [ ' jbtime '] = = $timsInt) && ($ipid = = $d [' Jbip '])) {$boolTure = false;}} if ($boolTure | | count ($data) ==0) {$array [$k] [' jbip '] = $ipid; $array [$k] [' jbtime '] = $timsInt; if ($class = = ' 1 ') {$type = tr Im ($this->unicode_decode ($this->strsub ($value, ' TypeText ":" ', ' "," Qq1 ')));} if ($class = = ' 2 ') {$type = Trim ($this->unicode_decode ($this->strsub ($value, ' TypeText ":" ', ' "," WW1 ')));} $array [$k] [' type '] = (array_key_exists ($type, $typeArray))? $typeArray [$type]: ' Other '; $array [$k] [' number '] = $number; array[$k [' class '] = $class; $array [$k] [' whitelist '] = ' 0 ';}} $rel = M (' number ')->addall ($array);}}} if (count ($array)) {foreach ($array as $a) {$data []= $a;}} return $data;}
The code contains oneline data and twoline data, how to put these two sets of data together, thank you!
Reply to discussion (solution)
Two pieces of data are written in the $array.
But the second paragraph might cover the first paragraph.
I'll try it first, thanks to two people.