--- --- ----- 1、界面更友善 2、优化主代码 3、更新热门词 4、增加搜索排行榜 5、修正切换搜索引擎时左栏不会随所选引擎自动变换问题 例:原http://s

源代码在线查看: function.asp

软件大小: 1334 K
上传用户: vbkechengsheji
关键词: http 代码 更新 搜索
下载地址: 免注册下载 普通下载 VIP

相关代码

								Function GetHttpPage(HttpUrl)
				   If IsNull(HttpUrl)=True Or HttpUrl="$False$" Then
				      GetHttpPage="$False$"
				      Exit Function
				   End If
				   Dim Http
				   Set Http=server.createobject("MSXML2.XMLHTTP")
				   Http.open "GET",HttpUrl,False
				   Http.Send()
				   If Http.Readystate4 then
				      Set Http=Nothing 
				      GetHttpPage="$False$"
				      Exit function
				   End if
				   GetHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
				   Set Http=Nothing
				   If Err.number0 then
				      Err.Clear
				   End If
				End Function
				
				Function BytesToBstr(Body,Cset)
				   Dim Objstream
				   Set Objstream = Server.CreateObject("adodb.stream")
				   objstream.Type = 1
				   objstream.Mode =3
				   objstream.Open
				   objstream.Write body
				   objstream.Position = 0
				   objstream.Type = 2
				   objstream.Charset = Cset
				   BytesToBstr = objstream.ReadText 
				   objstream.Close
				   set objstream = nothing
				End Function
				
				Function GetBody(ConStr,StartStr,OverStr,IncluL,IncluR)
				   If ConStr="$False$" or ConStr="" or IsNull(ConStr)=True Or StartStr="" or IsNull(StartStr)=True Or OverStr="" or IsNull(OverStr)=True Then
				      GetBody="$False$"
				      Exit Function
				   End If
				   Dim ConStrTemp
				   Dim Start,Over
				   ConStrTemp=Lcase(ConStr)
				   StartStr=Lcase(StartStr)
				   OverStr=Lcase(OverStr)
				   Start = InStrB(1, ConStrTemp, StartStr, vbBinaryCompare)
				   If Start				      GetBody="$False$"
				      Exit Function
				   Else
				      If IncluL=False Then
				         Start=Start+LenB(StartStr)
				      End If
				   End If
				   Over=InStrB(Start,ConStrTemp,OverStr,vbBinaryCompare)
				   If Over				      GetBody="$False$"
				      Exit Function
				   Else
				      If IncluR=True Then
				         Over=Over+LenB(OverStr)
				      End If
				   End If
				   GetBody=MidB(ConStr,Start,Over-Start)
				End Function
				
				Function ShowErr(ErrMsg)
				Response.write "alert('" & ErrMsg &"');history.back();"
				Response.end
				End Function
				%>
							

相关资源