remoteCode.asp
上传用户:ahxunteng
上传日期:2022-05-16
资源大小:1606k
文件大小:1k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
VBScript
- <%
- 'On Error Resume Next
- 'Server.ScriptTimeOut=9999999
- Function getHTTPPage(Path)
- t = GetBody(Path)
- getHTTPPage=BytesToBstr(t,"GB2312")
- End function
- Function GetBody(url)
- on error resume next
- Set Retrieval = CreateObject("Microsoft.XMLHTTP")
- With Retrieval
- .Open "Get", url, False, "", ""
- .Send
- GetBody = .ResponseBody
- End With
- Set Retrieval = Nothing
- 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 Newstring(wstr,strng)
- Newstring=Instr(lcase(wstr),lcase(strng))
- if Newstring<=0 then Newstring=Len(wstr)
- End Function
- %>
- <%
- Function GetCode(user,password,codeNumber)
- dim url
- url="http://localhost/test/index.asp?user="&user&"&pass="&password&"&codenumber="&codeNumber
- GetCode=getHTTPPage(url)
- end Function
- %>
English
