希望这个方法对你有帮助asp读取网页源代码的方法极数博客陈佳裕博客">陈佳裕博客<%Function bytes2BSTR(vIn) strReturn = "" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i 1,1)) strReturn = strReturn & Chr (CLng(ThisCharCode) * &H100 CInt(NextCharCode)) i = i 1 End If Next bytes2BSTR = strReturn End Function QUrl = Request.QueryString("url")if QUrl<>"" thenset oSend=createobject("Microsoft.XMLHTTP")SourceCode = oSend.open ("GET",QUrl,false) oSend.send()if err.number<>0 thenResponse.write err.descriptionResponse.End()end if SourceCode = bytes2BSTR(oSend.responseBody)if Request.QueryString("type")<>"" thenresponse.write Server.HTMLEncode(SourceCode)elseresponse.write SourceCodeend ifend if%>fdasdfasdfdsafasdfasdfasfasd<form action="" method="get"><p><input name="url" type=text id="url"></p><p><label><input type="radio" name="type" value="radiobutton" />显示代码</label></p><p><input type="submit" name="Submit" value="提交" /></p></form>
asp读取网页源代码的方法
未经允许不得转载:福利吧|福利社|fuliba » asp读取网页源代码的方法
相关推荐
- 暂无文章