Пример #1
0
<?php

namespace app;

require './network/Network.php';
require './WxSpider.php';
use app\utils\sogoWx\WxSpider;
$wxSpider = new WxSpider();
$wxSpider->getAccounts('华德福');
Пример #2
0
<?php

namespace app;

require './network/Network.php';
require './WxSpider.php';
use app\utils\sogoWx\WxSpider;
$wxSpider = new WxSpider();
$wxSpider->getAccounts('头发');
Пример #3
0
 private function getData($url)
 {
     set_time_limit(60);
     //每次请求,多加60秒等待时间,避免timeout
     $md5 = md5($url);
     $data = WxSpider::getCache($md5);
     if ($data) {
         return unserialize($data);
     }
     $data = $this->network->get($url);
     WxSpider::setCache($md5, serialize($data));
     return $data;
 }