<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %> <% call head() sid=request("sid") Response.Write ""& chr(13) Response.Write "

"& chr(13) On Error Resume Next Server.ScriptTimeOut=9999999 Function getHTTPPage2(Path) t = GETBody(Path) End function function getHTTPPage2(url) dim Http set Http=server.createobject("Microsoft.XMLHTTP") Http.open "GET",url,false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage2=bytesToBSTR(Http.responseBody,"utf-8") set http=nothing if err.number<>0 then err.Clear 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 getHTTPPage(Path) t = GetBody(Path) End function dim word word=request("word") if word<>"" then Dim Url,Html,start,over,body,wap,wstr,str Url="http://wap.baidu.com/baidu?word="&word&"&ssid=anonymous&tn=wisedict&ie=unicode&cl=2&ct=1048576&uid=wap_1220707636_782&bd_page_type=0&cpos=0&psz=400&from=0&wtn=wsdict" wstr=getHTTPPage2(url) start=Instr(wstr,"

") over=Instr(wstr,"Dr.eye译典通字典 提供") body=mid(wstr,start,over-start) body = replace(body,"

","") body = replace(body,"baidu?","dict.asp?") if body="" then Response.write"对不起,没找到匹配的词典解释
" else Response.write body end if end if Response.Write "请输入关键词:
" Response.Write "
" Response.Write "词典查询 " Response.Write "" Response.Write "
" Response.Write "英汉双语互译检索,只支持单词,不支持句子
" call last() Sub Head() Response.ContentType = "text/vnd.wap.wml" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" End Sub Sub Last() response.write "
返回上级" response.write "
网站首页
" response.write"."&Month(Now)&"月"&Day(Now)&"日"&FormatDateTime(Now,vbshortTime)&"" response.write "

" Response.End End Sub %>