$key"; } if($swsstr!="") { $swsstr .=","; } $swsstr = str_replace('|,','',$swsstr); $linkarray = json_decode($linkresult,true); $linkcount = count($linkarray['response']['docs']); $linkarr = array(); $keylink =""; for ($i = 0; $i < $linkcount; $i++) { $linkstr = $linkarray['response']['docs'][$i]['tag']; $linkarr[] = $linkstr; $keylink=$keylink."
  • ".cn_substr_utf8($linkstr,20)."
  • "; } //$keylinkresult = file_get_contents('http://124.17.1.111/so/keywordsearch.php?wd=中医'); //echo $keylinkresult; //echo ""; $solr = new Apache_Solr_Service('localhost', '8080', '/solr'); //测试连接 if (!$solr->ping()) { echo 'Solr service not responding.'; exit; } $offset = (isset($_GET["start"]) && is_numeric($_GET["start"]) ? $_GET["start"] : 0); $limit = 10; if(!empty($_GET["fq"])) { if( $_GET["fq"]=="ask") { $fq = "type:ask"; } if( $_GET["fq"]=="bbs") { $fq = "type:bbs"; } if( $_GET["fq"]=="other") { $fq = "type:other"; } if( $_GET["fq"]=="commerce") { $fq = "type:commerce"; } if( $_GET["fq"]=="news") { $fq = "type:news"; } if( $_GET["fq"]=="brand") { $fq = "type:brand"; } if( $_GET["fq"]=="xiazai") { $fq = "type:xiazai"; } if( $_GET["fq"]=="blog") { $fq = "type:blog"; } } //时间查询 //fq=tstamp:[2011-07-25T01:07:05Z TO 2011-12-25T01:07:05Z] if(!empty($_GET["tsn"])) { $tsn = (!empty($_GET["tsn"]) && is_numeric($_GET["tsn"]) ? $_GET["tsn"] : 0); //一天内 $thisdate = $thistime=date("Y-m-d")."T00:00:00Z"; //现在 $thistime=date("Y-m-d H:i:s")."Z"; $nowtime = str_replace(' ','T',$thistime); //昨天 $yestoday = date("Y-m-d",strtotime("-1 day"))."T00:00:00Z"; //一周内 $weektoday = date("Y-m-d",strtotime("-1 week"))."T00:00:00Z"; //一个月内 $monthtoday = date("Y-m-d",strtotime("-1 month"))."T00:00:00Z"; //一年内 $yeartoday = date("Y-m-d",strtotime("-1 year"))."T00:00:00Z"; if($tsn==1) { $fq = "tstamp:[".$yestoday." TO ".$nowtime."]"; } if($tsn==2) { $fq = "tstamp:[".$weektoday." TO ".$nowtime."]"; } if($tsn==3) { $fq = "tstamp:[".$monthtoday." TO ".$nowtime."]"; } if($tsn==4) { $fq = "tstamp:[".$yeartoday." TO ".$nowtime."]"; } $sort = 'tstamp desc'; } $qf="title^1.9 content^0.8"; $pf="title content"; $bf="sum(recip(ms(NOW,tstamp),1,1,100),div(digest,5632000),div(boost,1000000))"; $defType="edismax"; $enableElevation="true"; $forceElevation="false"; $exclusive="false"; $response = $solr->search( $query, $offset, $limit, array('sort' => $sort,'fq' => $fq,'qf' => $qf,'pf' => $pf,'defType' => $defType,'enableElevation' => $enableElevation,'forceElevation' => $forceElevation,'exclusive' => $exclusive)); ?> <?php echo $title;?>
    " method="get">
    response->numFound; $limitsize = ceil($total/$limit);//计算总分页 ?>
    共约 条结果,当前第
    response->docs as $doc ) { //print_r($doc); $title = $doc->title; foreach($consult as $v){ if(mb_strstr($title,$v[0])){ $chatbox = ' '; break; } } ?>

    litpic) && $doc->litpic<>"http://yipu.com.cn"){ ?> type=="bbs") echo ReplaceKeyword($karr,$kaarr,cn_substr_utf8(SpHtml2Text($doc->bbsbody),224)); else if($doc->type=="ask") echo ReplaceKeyword($karr,$kaarr,cn_substr_utf8(SpHtml2Text($doc->askbody),224)); else echo ReplaceKeyword($karr,$kaarr,cn_substr_utf8(SpHtml2Text($doc->content),224)); ?> ...

    的相关搜索

    $limit) { ?>
    =$limit) { ?> &tsn=" class="PagePrevious"> < 上一页 5) { ?> 上一页 =4) $offsetnum=($offset/$limit)-3; for($i=$limit*($offsetnum-1),$j=0;$i<=$limitsize*$limit&&$j<9;) { if($limitsize*$limit%10==0&&$i==$limitsize*$limit) break; //搜索结果为整数的时候处理 if($offset==($i/$limit)*$limit) { ?> &tsn="> 11 && $offset<($limitsize*$limit-$limit)) { ?> &tsn=">下一页 > 下一页 >
    " method="get">
    ">
    推广信息
    易铺网关键字广告
    yipu.com.cn
    易铺网正式授权合作伙伴,精通键字推广,短期帮您赢得更多商机与财富
    想在此看到您的广告吗?>>