可以实现在自己的网站实现百度搜索效果。演示地址:http://www.cnpatent.com/search/so_index.asp?str_key=%B5%E7%D7%D3
百度的页面代码有点改动,可以用下的替换。
http://www.cnpatent.com/换成自己的地址
TitleStarStr="百度一下,"
TitleEndStr="秒</div>"
TitleStrType=2
CreateTitle=Trim(RemoveHTML(strCut(getHTTPPage,TitleStarStr,TitleEndStr,TitleStrType)))
'if Instr(getHTTPPage,"来百度推广您的产品")>0 then
'ContentStarStr="咨询热线:400-800-8888"
'else
'ContentStarStr="来百度推广<font color=#C60A00>"&str_key&"</font>"
'end if
ContentStarStr="<table cellpadding=""0"" cellspacing=""0"" class=""result"""
'ContentStarStr="<font color=""#008000"" size=""-1"">e.baidu.com</font></a></div></div><br /></div><br></td></tr></table>"
ContentEndStr="下一页</a> </div>"
ContentStrType=2
PageContent=strCut(getHTTPPage,ContentStr,ContentEnd,StrType)
CreateContent="<table cellpadding=""0"" cellspacing=""0"" class=""result"""&Trim(strCut(getHTTPPage,ContentStarStr,ContentEndStr,ContentStrType))&"下一页</a> </div>"
'CreateContent=Replace(CreateContent,"s?wd=","http://www.baidu.com/s?wd=")
CreateContent=Replace(CreateContent,"s?wd=","http://www.cnpatent.com/search/so_index.asp?wd=")
3
87
9KB
2010-04-29
9