现在的位置: 首页 > 综合 > 正文

get the company infomation which we want to get

2014年09月13日 ⁄ 综合 ⁄ 共 771字 ⁄ 字号 评论关闭

function get_myinfo($data,$infopara){
 $preg = '/>([^<]*?'.conv2utf8($infopara).'[^"]*?)</si';
 
 preg_match_all($preg, $data, $match);

 $nlast = count($match[1])-1;
 if($nlast>=0)
 {

  $ret = $match[1][$nlast];
  $ret=str_replace('&nbsp;', ' ', $ret);
  // echo $ret."<br>";
  $ret =  html2txt($ret);

  $article_list3= explode(" ",$ret);
  $myc=count($article_list3);
  if($myc<=2) $pm=$pm+10;
  for($dj=0;$dj<$myc;$dj++)
  {
   // echo $article_list3[$dj]."---".conv2utf8($infopara)."<br>";
   $count_times =  substr_count($article_list3[$dj],conv2utf8($infopara));
   // if($count_times>=0) return  $article_list3[$dj];
   //echo "<br>".$count_times ;
   // echo $article_list3[$dj]."---".conv2utf8($infopara)."--".$count_times."<br>";
   if($count_times>0) return  $article_list3[$dj];

  }

  return $ret;
 }
 else return "";

 

}

【上篇】
【下篇】

抱歉!评论已关闭.