示例#1
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;
 }