diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index 46d18637..2800dfbc 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -944,8 +944,9 @@ class ServiceController extends Zend_Controller_Action curl_close($ch); $rev = array(); - $max = 5; - if(preg_match_all("#(.+?)#i",$body,$matchs,PREG_PATTERN_ORDER)) + $max = 5; + $error=''; + if(preg_match_all("#(.+?)<\/a>#im",$body,$matchs,PREG_PATTERN_ORDER)) { foreach ($matchs[2] as $k=>$v){ if($k < $max) $rev[$k]['title']=$v; @@ -957,7 +958,7 @@ class ServiceController extends Zend_Controller_Action $error = "无搜索结果"; } - if(preg_match_all("#(.+?)#i",$body,$matchs,PREG_PATTERN_ORDER)) + if(preg_match_all("#(.+?)<\/span>#im",$body,$matchs,PREG_PATTERN_ORDER)) { foreach ($matchs[1] as $k=>$v){ if($k < $max) $rev[$k]['content']=$v;