ASP问题~!高手进。在线等啊

来源:百度知道 编辑:UC知道 时间:2024/05/28 10:16:39
ASP获取其他网站网页的内容~!

可以使用,Microsoft.XMLHTTP类组建实现。
如果你对AJAX有了解,那将很有帮助。

<%
Function GetURL(URL)
Set http=Server.CreateObject("Microsoft.XMLHTTP")
On Error Resume Next
http.Open "GET",URL,False
http.send()
if Err then
Err.Clear
Response.End()
End if
getHTTPPage=bytesToBSTR(Http.responseBody,"gb2312")
set http=nothing
GetURL=getHTTPPage
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

uurl="http://www.leletianko