php使用curl抓取qq空间的访客信息示例(7)

if ($visitor['name']) {
                        $_ = array(
                            'uin' => $visitor['uin'], 'name' => $visitor['name'], 'time' => $visitor['time'],
                            'yellow' => $visitor['yellow'], 'supervip' => $visitor['supervip'],
                        );
                        if (array_key_exists('portraitlabel', $visitor)) {
                            $_['portraitlabel'] = $visitor['portraitlabel'];
                        }
                        $visitor_list[] = $_;

if (array_key_exists('uins', $visitor)) {
                            foreach ($visitor['uins'] as $uins) {
                                $_ = array(
                                    'uin' => $uins['uin'], 'name' => $uins['name'], 'time' => $uins['time'],
                                    'yellow' => $uins['yellow'], 'supervip' => $uins['supervip'],
                                );

if (array_key_exists('portraitlabel', $uins)) {
                                    $_['portraitlabel'] = $uins['portraitlabel'];
                                }
                                $visitor_list[] = $_;
                            }
                        }
                    }
                }
            }
        }
        return $visitor_list;
    }

public static function  checkVC($content)
    {
        preg_match_all('/.*?\((.*)\).*?/', $content, $match);

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6a3b396fe61b016e0da9eb2453f6669b.html