希望这个方法对你有帮助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读取网页源代码的方法
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《asp读取网页源代码的方法》
文章链接:https://www.skykkk.com/archives925.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
文章名称:《asp读取网页源代码的方法》
文章链接:https://www.skykkk.com/archives925.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
相关推荐
- 暂无文章