温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

php查询多个门户网站页面搜索结果简单代码

发布时间:2020-06-13 15:34:07 来源:网络 阅读:1567 作者:longmaoheyezhu 栏目:web开发

在门户网站搜索信息的功能.

site.php

main.php

left.php

search.php

common/function.php

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

site.php

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=GBK">

<link href="./css/style.css" rel="stylesheet">

<title>全国最全最大的搜索引擎</title>

</head>

<script language="javascript">

function check(){

if(myform.keyword.value==""){

alert("请输入查询关键字!");myform.keyword.focus();return false;

}

}

</script>

<body>

<br><br><br><br>

<br>

<br>

<br><br><br>

<a href="./" target="_self"><img src="p_w_picpaths/kuaikuaisou.gif" border="0" width="216" height="137"></a><br>

<br>

<table width="592" border="0" cellspacing="0" cellpadding="0" height="16">

<tr align="center">

<td width="592" height="9">

<table width="600" border="0" cellspacing="0" cellpadding="0" height="23">

<tr align="center">

<td width="49" class="su1" id="su99s1" onClick="so99su(2)"><a href="./index.php" target="_self">站内</a></td>

<td width="1"></td><td width="49" class="su0" id="su99s2" onClick="so99su(1)"><a href="./site.php" target="_self">网页</a></td>

<td width="1"></td><td width="49" class="su1" id="su99s3" onClick="so99su(3)">音乐</td>

<td width="1"></td><td width="49" class="su1" id="su99s4" onClick="so99su(4)">铃声</td>

<td width="1"></td><td width="49" class="su1" id="su99s5" onClick="so99su(5)">图片</td>

<td width="1"></td><td width="49" class="su1" id="su99s6" onClick="so99su(6)">电影</td>

<td width="1"></td><td width="52" class="su1" id="su99s7" onClick="so99su(7)">新闻</td>

<td width="1"></td><td width="52" class="su1" id="su99s8" onClick="so99su(8)">B T</td>          

<td width="1"></td><td width="52" class="su1" id="su99s9" onClick="so99su(9)">论坛</td>

<td width="1"></td><td width="49" class="su1"id="su99s10" onClick="so99su(10)">图书</td>

<td width="1"></td><td width="49" class="su1"id="su99s11" onClick="so99su(11)">更多</td>

<td width="1"></td></tr></table>

</td>           

</tr>

<form name="s" method="get" action="main.php" target="_self">

<tr align="center">

<td height="96" background="p_w_picpaths/bg2.gif" >

  <p align="center">

<input type="hidden"  name="shq" value="84">

    <input name="keyword" type="text"  id="keyword" size="60" maxlength="100"  onMouseOver="this.focus()" onFocus="this.select()" class="txt"/>&nbsp;

    <input name="submit" type="submit"  value="codego.net 互联网搜索" class="btn" onClick="return check();">

  </p>

 <p align="center"><font color="#008000">

   <input type="radio"  value="baidu" name="xm" class="tb1" checked><a href="http://www.baidu.com" target="_blank">百度</a>&nbsp;

   <input type="radio" value="google" name="xm" class="tb1"> <a href="http://www.google.com" target="_blank">Google</a>&nbsp;

   <input type="radio" value="msn" name="xm" class="tb1"> <a href="http://www.msn.com" target="_blank">MSN中国</a>&nbsp;

   <input type="radio" value="zhongsou" name="xm" class="tb1"><a href="http://www.zhongsou.com" target="_blank">中搜</a>&nbsp;

   <input type="radio" value="sogou" name="xm" class="tb1"><a href="http://www.sogou.com" target="_blank">搜狗</a>&nbsp;

   <input type="radio" value="tianw" name="xm" class="tb1"><a href="http://www.tianwang.com" target="_blank">天网</a>&nbsp;

   <input type="radio" value="iask" name="xm" class="tb1"> <a href="http://www.iask.com" target="_blank">爱问</a>&nbsp;

   <input type="radio" value="yahoo" name="xm" class="tb1"><a href="http://www.yahoo.com.cn" target="_blank">雅虎</a>&nbsp;

   <input type="radio" value="17sou" name="xm" class="tb1"><a href="http://www.17so.com" target="_blank"> 一起搜</a>&nbsp;

   </font></p>                       

 </td>                                                         

</tr>

</form> 

</table>

<p><a href="./manage/admin/login.php">&nbsp;</a><a href="http://www.mrbccd.com">编程词典</a>&nbsp;|&nbsp;<a onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.mrbccd.com')" href="http://www.mrbccd.com">把快快搜设为首页</a>&nbsp;|&nbsp;<a href="http://www.mrbccd.com">关于快快搜</a></p>

<p><span class="STYLE1">Copyright&nbsp;&copy;&nbsp;快快搜主站 www.mrbccd.com All Rights Reserved!</span><span class="STYLE1">&nbsp;吉ICP备 122345678</span></p>

<p>

<script>function so99su(n){

var KeyNo=Math.floor(6*Math.random());

for(i=1;i<12;i++){

eval("document.getElementById('su99s"+i+"').className='su1'");

}

eval("document.getElementById('su99s"+n+"').className='su0'");

if(n==1){s.shq.value="zn";}

else if(n==2){s.shq.value="wy";}

else if(n==3){s.shq.value="yy";}

else if(n==4){s.shq.value="ls";}

else if(n==5){s.shq.value="tp";}

else if(n==6){s.shq.value="dy";}

else if(n==7){s.shq.value="new";}

else if(n==8){s.shq.value="bt";}

else if(n==9){s.shq.value="bbs";}

else if(n==10){s.shq.value="book";}

else if(n==11){s.shq.value="more";}

}

</script> 

</p>

</body>

</html>

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

left.php

<?php 

$keyword =$_GET['keyword']; 

$xm=$_GET['xm'];

$keyword2=urlEncode($keyword); 

$keyword3=strtolower($keyword2); 

if($keyword =="") 

{echo "你没有输入条件啊!!"; 

exit;} 

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=GBK">

<link  href="./css/style.css" rel="stylesheet" type="text/css">

<style>

body  {text-align: left;}

.t1{ color: #FFFF00;font-family: Webdings;} 

.t2{ color: #9999FF;font-family: Webdings;} 

.parent{width:100%; height: 20; letter-spacing: 2; vertical-align: 0; font-weight: bold; background-color: #66CCFF; border-bottom-style: solid; border-bottom-width: 1}

</style>

<base target="cjss">

</head>

<BODY>

<?php print <<<EOT

<script>if(top==self)top.location="main.php?keyword=$keyword";</script>

<form action="main.php" method="get" target="_top">

        <table border="0" cellpadding="2" cellspacing="0" bgcolor="#47AFF" width="100%">

      <tr>

        <td width="100%" align="center"><a href="./" target="_top"><img  src="p_w_picpaths/kuaikuaisou.gif" border="0" width="120" height="68"></a><br>

          <br>&nbsp;<input name="keyword" value="$keyword" size="15" >

  </td>

      </tr>

      <tr>

        <td width="100%"  height="35" align="center">

           &nbsp;<input type="submit" value="极速搜索" class="btn">

        </td>

      </tr> </FORM>

  

  </table>&nbsp;

<!--网页标题-->

<div class='parent' ><font class="t1">8</font>&nbsp;网页</div>

<!--下面是常用的大型搜索引擎-->

<div >&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://www.baidu.com/s?tn=aiyat&ct=&lm=&z=&rn=&_sv=1&word=$keyword2">百度</a>

<br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://www.google.com/search?hl=zh-CN&newwindow=1&q=$keyword2">GOOGLE</a>

<br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://cnweb.search.live.com/results.aspx?q=$keyword2&page=searchresults&FORM=MSNH&where1=&mkt=zh-cn">MSN中国</a>

<br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://page.zhongsou.com/p?aid=E0200000000&k=tlei&w=$keyword2">中搜</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://www.sogou.com/websearch/corp/search.jsp?query=$keyword2&searchtype=1&pid=aiyatx&class=1&cpc=SOGOU">搜狗</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://www.tianwang.com/cgi-bin/tw?word=$keyword2&range=0&cd=03&submit.x=14&submit.y=7">天网</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://iask.sina.com.cn/search_engine/search_knowledge_engine.php?key=$keyword2&classid=0&title=PHP&gjss=0&x=27&y=13">爱问</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://search.union.yahoo.com.cn/click/search.htm?fw=union&m=82676&b=1003&p=1009&a=2001&name=$keyword2">雅虎</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://www.17so.com/so?q=$keyword2">一起搜</a>

</div>

<!--音乐歌词-->

<div class='parent'><font  class="t1">8</font>&nbsp;音乐歌词</div>

<!--下面是常用的歌词网站-->

<div >&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://music.qq.com/portal_v2/static/search_result.html?search_input=$keyword2&search_bt.x=33&search_bt.y=11">QQ音乐</a><br> &nbsp;<font class="t2">4</font>&nbsp;

<a href="http://mp3.baidu.com/m?tn=baidump3&ct=134217728&lm=-1&z=&rn=&_sv=4&word=$keyword2&_si.x=15&_si.y=9">百度MP3</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://music.yahoo.com.cn/search?p=$keyword2&pid=82676_1006&needbid=&ei=GBK&source=3721_union">雅虎MP3</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://mp3.zhongsou.com/m?w=$keyword2&ty=&lg=">中搜 MP3</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://d.sogou.com/music?query=$keyword2&searchtype=4&pid=aiyatx&class=1&cpc=SOGOU">搜狗MP3</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://m.iask.com/g?k=$keyword2&ss=all">爱问MP3</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://mp3.baidu.com/m?f=ms&tn=baidump3lyric&ct=150994944&lf=1&rn=10&word=$keyword2&lm=-1">百度歌词 </a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://music.yahoo.com.cn/lyric.html?pid=82676_1006&p=$keyword2&button=$keyword2&button=%B8%E8%B4%CA%CB%D1%CB% F7&mimetype=all&source=ysearch_music_result_topsearch">雅虎歌词</a>

</div>

<!--电影网站-->codego.net/tags/4/1/

<div class='parent'><font  class="t1">8</font>&nbsp;电影</div>

<!--下面是常用的电影网站-->

<div class='child'  >&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://movie.baidu.com/srh.php?tn=baidux&word=$keyword2">百度影视</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://video.search.yahoo.com/search/video?p=$keyword2&toggle=1&ei=GBK">雅虎 Video</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://v.iask.com/v?k=$keyword2">爱问视频</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://file.tianwang.com/cgi-bin/search?word=$keyword2&FType=3&submit.x=31&submit.y=12">天网影视</a>

</div>

<!--软件源码-->

<div class='parent'><font  class="t1">8</font>&nbsp;软件源码&nbsp;</div>

<!--下面是常用的软件源码网站-->

<div class='child' >&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://search3.onlinedown.net/search.asp?keyword=$keyword2">华军软件园</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://www.skycn.com/search.php?offset=0&ss_name=$keyword2">天空软件</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://down.chinaz.com/query.asp?action=title&keyword=$keyword2&page=1">中国站长站</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://dlc.pconline.com.cn/search.jsp?keyword=$keyword2">太平洋软件</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://soft.sogou.com/software.so?query=$keyword2&amp;class=4">搜狗下载</a></div>

<!--论坛网站-->

<div  class='parent'><a name="bbs"></a><font  class="t1">8</font>&nbsp;论坛</div>

<!--下面是一些大型的论坛-->

<div  class='child'  >&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://post.baidu.com/f?kw=$keyword2">百度贴吧</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://search.bbs.sina.com.cn/search/search?gid=3&bbsid=19&t=keyword&q=$keyword2">新浪说吧</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://search.chinabbs.com/cgi-bin/search?content=$keyword2&type=title">Chinabbs</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://bbs.zhongsou.com/b?w=$keyword2&dt=1&webid=tlei&aid=B0100006149">中搜论坛</a></div>

<!--新闻网站-->

<div class='parent'><font  class="t1">8</font>&nbsp;新闻</div>

<!--下面是一些知名的新闻网站-->

<div class='child'  >&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://news.baidu.com/ns?tn=news&ct=201326592&lm=-1&z=0&rn=&_sv=2&word=$keyword2&_si.x=12&_si.y=5">百度新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://xinwen.yahoo.com.cn/search?p=$keyword2&pid=82676_1006&needbid=&ei=GBK&source=3721_union">雅虎新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://iask.com/n?k=$keyword2">新浪新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://news.sogou.com/news?query=$keyword2&searchtype=5&pid=aiyatx&class=1&cpc=SOGOU">搜狗新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://search.xinhuanet.com/search/searchnews.jsp?sw=$keyword2">新华网新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://news.zhongsou.com/zsnews.cgi?word=$keyword2&hcsource=&selectact=&class1=">中搜新闻</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://news.google.com/news?hl=zh-CN&ned=cn&ie=UTF-8&q=$keyword2">GOOGLE新闻</a></div>

<!--图片资源网站-->

<div class='parent'><font class="t1">8</font>&nbsp;图片</div>

<div id='KB8Child' class='child' >&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://p_w_picpath.baidu.com/i?tn=baidup_w_picpath&ct=201326592&lm=- 1&z=0&rn=&_sv=6&word=$keyword2&_si.x=15&_si.y=11">百度图片</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://p_w_picpath.yahoo.com.cn/search?p=$keyword2&pid=82676_1006&needbid=&ei=GBK&source=3721_union">雅虎图片</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://p_w_picpaths.google.com/p_w_picpaths?q=$keyword2&amp;hl=zh-CN">Google图片</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://img.zhongsou.com/i?w=$keyword2&amp;t=&amp;l=">中搜图片</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a  href="http://p_w_picpath.sogou.com/imgsearch.jsp?keyword=$keyword2&amp;sogouhome="> 搜狗图片</a><br>&nbsp;<font class="t2">4</font>&nbsp;

<a href="http://p.iask.com/p?k=$keyword2">爱问图片</a>  </div>  

</BODY>  

</HTML> 

<!--

EOT;

?>-->


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

search.php

<html>

<link rel="stylesheet" href="./css/style.css" />

<style type="text/css">

<!--

.STYLE13 {color: #FF3399}

.STYLE16 {color: #FF0000}

.STYLE20 {color: #0066FF}

.STYLE21 {color: #006600}

-->

</style>

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td width="96%" align="left">

<?php require_once("top.php");?>

</td>

  </tr>

</table>

<?

require("splitword.php");

require("common/function.php");

if($_GET){

$keyword=$_GET[keyword];

}

if($submit2!=""){ //???é???á?????é??

$h_keyword=$hide_keyword; //????????????

$keynew=$keyword;

$h_keyword.=$keyword; //????????+????

  $keyword=$h_keyword; //??×???????????keyword

}

$yuan=trim($keyword);

$tt= $yuan;

$str=gl($tt);

$sp = new SplitWord();

//·????è?????????±????·???????????·??????·

$time_start = getmicrotime();

$sp->SplitRMM($str);

$tt=$sp->SplitRMM($str);

?>

<?php

require_once("./common/db_mysql.class.php");

$DB = new DB_MySQL; //???¨???ó

$str=array(" ",""); //?¨????????×é

$cc=str_replace($str,"",$tt); //????×?·???????????

if(substr($cc,0,2)=="??"){

$cc= substr($cc,2); //?????°?????°???±·???

}

if(substr($cc,-2,2)=="??"){

$cc= substr($cc,0,-2); //?????ó?????°???±·???

}

if(substr($cc,0,2)=="??" && substr($cc,-2,2)=="??"){

$a= substr($cc,2); //?????°?????°???±·???

$cc= substr($a,0,-2); //?????ó?????°???±·???

}

$newstr = explode("??",$cc); //????explode()??????×?·???×???????×é

if(count($newstr)==1){ //??????×é????????????1?????ò°??????????????é??

 $sql = "select * from tb_info where title like '%".$newstr[0]."%' or content like '%".$newstr[0]."%'order by id desc ";

}else{

if($submit2!=""){ //???é???á?????é??

//?????é??·???

$keynew=gl($keynew); //????±ê??·???

$sp1 = new SplitWord();

$sp1->SplitRMM($keynew);

$tc=$sp1->SplitRMM($keynew);

$cc1=dunhao($tc);

$newstr1 = explode("??",$cc1); //????explode()??????×?·???×???????×é

/***************************************************************************************/

//?????é??????·¨

$k_sql="select k_id from tb_temp";

$info = $DB->fetch_one_array($k_sql);

$kid=substr($info['k_id'],0,-1); //????×??ó?????°@?±

$k_id=explode('@',$kid); //??ID??×???????×é

$sql = "select * from tb_info "; //?é??????±í????????

while(list($name,$value)=each($k_id)){ //±é?ú??×é

   $a.="$value".",";

}

$a= substr($a,0,-1); //????×??ó?????°,?±·???

//????in???ü×??é???ù??ID????????????

$sql .= " where id in(".$a.") "; //???¨?à????????

$sql2=" and (";

for($i=0;$i<count($newstr1);$i++){

$sql0.=" title like '%".trim($newstr1[$i])."%'"." or";

}

for($j=0;$j<count($newstr1);$j++){

$sql1.=" content like '%".trim($newstr1[$j])."%'"." and";

}

$sql1=substr($sql1,0,-3); //????×??ó?????°and?±

$sql3=")";

$sql.=$sql2.$sql0.$sql1.$sql3. " order by id desc";

}

else{

//?????é???á????

for($i=0;$i<count($newstr);$i++){

$sql0.=" title like '%".trim($newstr[$i])."%'"." or";

}

for($j=0;$j<count($newstr);$j++){

$sql1.=" content like '%".trim($newstr[$j])."%'"." or";

}

$sql1=substr($sql1,0,-3); //????×??ó?????°or?±

$sql="select * from tb_info where".$sql0.$sql1." order by id desc";

}

}

if($_GET){

//???????á????????

$page_num = $_GET['page_num']? $_GET['page_num']: 1;

}

else{

//?×???????±,??????1

$page_num = 1;

}

//????×???????

$DB->query($sql);

$row_count_sum = $DB->get_rows();

$row_count_sum;

//??????????,???????????????ò???±?????¨??

$row_per_page = 6;

//×?????

$page_count = ceil($row_count_sum/$row_per_page);

//??????·??????????ò??×??ó????

$is_first = (1 == $page_num) ? 1 : 0;

$is_last = ($page_num == $page_count) ? 1 : 0;

//?é????????????

$start_row = ($page_num-1) * $row_per_page;

//??SQL?????í??limit×???

$sql .= " limit $start_row,$row_per_page";

//?????é??

$DB->query($sql);

$res = $DB->get_rows_array();

//?á????????

$rows_count=count($res);

$time_end = getmicrotime(); //?á?????±

$t0 = $time_end - $time_start; //???÷???±

?>

<TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#e5ecf9  >

  <tr>

    <td width="62%" border=1 >&nbsp;?ú?é???????ü×?????<?php echo $keyword;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "·???:  "; foreach( $newstr as $link) { ?> <a href="so.php?keyword=<?php echo urlencode($link); ?>"><?php echo $link." ";} ?></a></td>

    <td width="22%" border=1 >?ì?ì?????????à??????????&nbsp;<font  color="#AA0066"><?php echo $row_count_sum;?></font>&nbsp;????</td>

    <td width="16%" border=1 ><?php echo "???±?? $t0 ??";?></td>

  </tr>

</table>

<table width=100% height="600" border=0 cellspacing=0 cellpadding=0>

  <tr>

    <td valign="top"><br /><p>

        <?php

for($i=0;$i<$rows_count;$i++){

$id=$res[$i]['id']; //ID??

$title=$res[$i]['title']; //±ê??

$content = $res[$i]['content']; //????

?>

      </p>

      <table width="831" border="0" cellpadding="0" cellspacing="0" >

        <tr>

          <td width="831" height="23" class="alink">&nbsp;&nbsp;&nbsp;&nbsp;

  <a href="lookinfo.php?id=<?php echo $id; ?>" target="_blank">

  <?php

  for($n=0;$n<count($newstr);$n++){

 $title= str_ireplace($newstr[$n],"<font color='#FF0000'>".$newstr[$n]."</font>",$title);

}

   echo chinesesubstr($title,0,80);

   if(strlen($title)>80){ echo "...";}

  ?>

  </a></td>

        </tr>

        <tr >

          <td >&nbsp;&nbsp;&nbsp;&nbsp;

            <?php

for($k=0;$k<count($newstr);$k++){

 $content= str_ireplace($newstr[$k],"<font color='#FF0000'>".$newstr[$k]."</font>",$content);

}

echo chinesesubstr($content,0,600);   

  if(strlen($content)>600){echo "...";} ?>

          </td>

        </tr>

      </table>

      <p>

        <?php

$key0.=$id.'@';

}

$key00=$key0;

 if($row_count_sum>0){

/* ???é???????ü×??????????±±í??*/

$ins="update tb_temp set k_id='".$key00."'";

$DB->query($ins);

}

/* *************************  */

  ?></p>

      <table width="100%" border="0">

        <tr>

          <td height="30">&nbsp;</td>

        </tr>

      </table>

  <?php 

  if($row_count_sum>0){

  ?>

      <table width="850" border="0" cellpadding="2" cellspacing="1" bgcolor="#99CCCC" >

        <tr height='26px' align="right">

          <th align="center" bgcolor="#E5ECF9">

            &nbsp;&nbsp; [·???????]</th>

        </tr>

        <tr height='26px'>

          <td align="center" bgcolor="#E5ECF9">

  <?php

if(!$is_first){

?>

            <a href="./search.php?page_num=1&keyword=<?php echo $keyword;?>">??????</a> <a href="./search.php?page_num=<?php echo ($page_num-1);?>&keyword=<?php echo $keyword;?>">??????</a>

            <?php

}

else{

?>

            ??????&nbsp;&nbsp;??????

            <?php

}

if(!$is_last){

?>

            <a href="./search.php?page_num=<?php echo ($page_num+1);?>&keyword=<?php echo $keyword;?>">??????</a> <a href="./search.php?page_num=<?php echo $page_count;?>&keyword=<?php echo $keyword;?>">×??ó????</a>

            <?php

}

else

{

?>

            ??????&nbsp;&nbsp;×??ó????

            <?php

}

?>

  </td>

        </tr>

      </table>

<?php

}else{

 $z_null="&nbsp;&nbsp;&nbsp;&nbsp;";

 if($row_count_sum==0){echo  $z_null."±§?????????ì?÷????&nbsp;<font color='FF0000'>".$yuan."</font>&nbsp;?à????????????";

 echo "<br><br><br>";

 echo  $z_null."?ì?ì?? ?¨?é?ú??<br>";

 echo  $z_null."?¤ ?é??????????×???·????ó<br>";

 echo  $z_null."?¤ ??????????±?????×????????? '??'??'??'??'??' ??<br>";

}

}

?>

      </td>

  </tr>

</table>

<table width=100% border=0 cellspacing=0 cellpadding=0>

  <tr>

    <td height=30 align=center><font color="#7777CC">?ì?ì???÷</font> <a href=http://www.mrbccd.com><font color=#7777CC>&copy; 2008&nbsp;&nbsp;?????????ì?ì???ù???ú??????×??????÷???á???????ú±í?ì?ì??????±????÷???????????ò????</font></a>&nbsp;</td>

  </tr>

</table>

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

main.php

<?php 

$keyword =$_GET['keyword']; 

$keyword2=urlEncode($keyword); 

$xm=$_GET['xm'];

if($keyword==""){

echo "对不起,您没有输入关键字!!<p><a href=\"javascript:history.back(1)\">点此返回</a></p>";

}

switch ($xm) {

   case  "baidu":

   $murl="http://www.baidu.com/s?wd=$keyword2";break;

   case "google":

$murl="http://www.google.com/search?hl=zh-CN&q=$keyword2";break;

   case  "msn":

       $murl="http://cnweb.search.live.com/results.aspx?q=$keyword2&go=&form=QBRE";break;

   case  "zhongsou":

 $murl="http://p.zhongsou.com/p?w=$keyword2";break;

   case  "sogou":

 $murl="http://www.sogou.com/web?query=$keyword2";break;

   case  "tianw":

 $murl="http://www.tianwang.com/cgi-bin/tw?cdtype=GB&word=$keyword2";break;

   case  "iask":

         $murl="http://www.iask.com/w?k=$keyword2&pid=33933&fromlianmeng=lianmeng";break;

   case  "yahoo":

 $murl="http://search.cn.yahoo.com/search?ei=gbk&fr=fp-tab-web-ycn&meta=vl%3Dlang_zh-CN%26vl%3Dlang_zh-TW&pid=ysearch&source=ysearch_www_hp_button&p=$keyword2";  break;

   case  "17sou":

      $murl="http://www.17so.com/so?q=$keyword2";break; 

}

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=GBK">

<title>快快搜----<?php echo $keyword;?></title>

<style type="text/css">.navPoint {COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt}</style>

</head>

<body scroll=no oncontextmenu="return false;" onclick="HideMenu();"><script>

function switchSysBar(){ //设置打开或关闭切换栏

if (switchPoint.innerText==3){

switchPoint.innerText=4

document.all("frmTitle").style.display="none"

}else{

switchPoint.innerText=3

document.all("frmTitle").style.display=""

}}

</script>

<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">

  <tr>

    <td align="middle" noWrap vAlign="center" id="frmTitle"><iframe frameborder="0"  src="left.php?keyword=<?php echo $keyword;?>" > </iframe></td>

    <td class=division>

    <table border="0" cellPadding="0" cellSpacing="0" height="100%" bgcolor="#47AFF">

      <tr>

        <td onClick="switchSysBar()">

        <font >

        <br>

        <span class="navPoint" id="switchPoint" title="关闭/打开左栏">4</span><br>

        <br>

        屏幕切换 </font></td>

      </tr>

    </table>    </td>

    <td ><iframe frameBorder="0" id="main" name="cjss" scrolling="yes" src="<?php echo $murl;?>" >

    </iframe></td>

  </tr>

</table>

<script>

if(window.screen.width<'1024'){ //如果屏蔽的宽度小于1024像素,那么调用自定义函数

switchSysBar();

}

</script>

</body>

</html>

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

<?php 

 function chinesesubstr($str,$start,$len) {  //$str??????,$start???????????λ???$len??????????

    $strlen=$start+$len;       //??$strlen?洢???????????????????????????λ???????????????

    for($i=0;$i<$strlen;$i++) { 

        if(ord(substr($str,$i,1))>0xa0) {      //?????????????????ASCII?????????0xa0,????????,

                                        //ord:ord() ??????????????????????? ASCII ?

            $tmpstr.=substr($str,$i,2);         //????????λ???????????$tmpstr???????????????

            $i++;    //???????1

        } 

else 

            $tmpstr.=substr($str,$i,1);   //????????????????????λ???????????$tmpstr

    } 

    return $tmpstr;      //?????????

}

/*function ExecTime(){  //?????????亯??

$time = explode(" ", microtime());

$usec = (double)$time[0]; 

$sec = (double)$time[1]; 

return $sec + $usec; 

}

*/

function getmicrotime(){ 

    list($usec, $sec) = explode(" ",microtime()); 

    return ((float)$usec + (float)$sec); 

}

function gl($tt){ //?????????

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("!","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array(";","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array(":","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("*","");

$tt=str_replace($str,'',$tt);

$str=array(".","");

$tt=str_replace($str,'',$tt);

$str=array(",","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("?","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("'","");

$tt=str_replace($str,'',$tt);

$str=array('\\',"");

$tt=str_replace($str,'',$tt);

$str=array('/',"");

$tt=str_replace($str,'',$tt);

$str=array("(","");

$tt=str_replace($str,'',$tt);

$str=array(")","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("_","");

$tt=str_replace($str,'',$tt);

$str=array("-","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$str=str_replace($str,'',$tt);

$str=array(" ","");

$str=str_replace($str,'',$tt);

return $str;

}

function dunhao($cc){

if(substr($cc,0,2)=="??"){

$cc= substr($cc,2); //????????????????

}

if(substr($cc,-3,2)=="??"){

$cc= substr($cc,0,-3); //????????????????

}

if(substr($cc,0,2)=="??" && substr($cc,-3,2)=="??"){

$a= substr($cc,2); //????????????????

$cc= substr($a,0,-3); //????????????????

}

return $cc;

}

function gl1($tt){ //?????????

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("!","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array(";","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array(":","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("*","");

$tt=str_replace($str,'',$tt);

$str=array(".","");

$tt=str_replace($str,'',$tt);

$str=array(",","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("?","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("'","");

$tt=str_replace($str,'',$tt);

$str=array('\\',"");

$tt=str_replace($str,'',$tt);

$str=array('/',"");

$tt=str_replace($str,'',$tt);

$str=array("(","");

$tt=str_replace($str,'',$tt);

$str=array(")","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$tt=str_replace($str,'',$tt);

$str=array("_","");

$tt=str_replace($str,'',$tt);

$str=array("-","");

$tt=str_replace($str,'',$tt);

$str=array("??","");

$str=str_replace($str,'',$tt);

return $str;

}

?>

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI