超碰牛牛91精品-国产精品久久婷婷九色在91-欧美日韩久久亚洲-日韩一区二区三区在线高清视频播放-成人人妻h在线观看-国产成人亚洲日本精品色戒-中文字幕亚洲综合熟女-麻豆精品国产高清在线观看-丰满少妇一区二区三区自拍区偷拍,国产热re99久久6国产精品,日韩精品成人免费电影,久久久在线免费观看精品视频

專業(yè)的廣州網(wǎng)站建設(shè)公司、廣州網(wǎng)站設(shè)計制作公司為您服務(wù),電話:020-85548809,29883069
新聞中心
專業(yè)專注專心,行業(yè)行情行規(guī)
分享交流,永無止境,我們愿與您共同進步

asp獲取遠程網(wǎng)頁的指定內(nèi)容

發(fā)布日期:[2010/8/21]   編輯:奇億廣州網(wǎng)站建設(shè)

用ASP獲取遠程網(wǎng)頁的指定內(nèi)容,可以輕易獲取到別人網(wǎng)頁的指定的某些內(nèi)容,其實也就是ASP小偷程序原理了,代碼如下:

<%
'用ASP獲取遠程目標網(wǎng)頁指定內(nèi)容,代碼由廣州網(wǎng)站建設(shè)http://www.studstu.com提供
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
        t = GetBody(Path)
        getHTTPPage=BytesToBstr(t,"GB2312")
End function
Function Newstring(wstr,strng)
        Newstring=Instr(lcase(wstr),lcase(strng))
        if Newstring<=0 then Newstring=Len(wstr)
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 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

'ASP獲取遠程網(wǎng)頁指定內(nèi)容開始
Dim wstr,str,url,start,over,dtime
a="開始內(nèi)容"         'ASP獲取目標網(wǎng)頁內(nèi)容開始標記
b="結(jié)束內(nèi)容"         'ASP獲取網(wǎng)頁內(nèi)容結(jié)束標記
url="http://www.studstu.com/"
        wstr=getHTTPPage(url)
        start=Newstring(wstr,a)
        over=Newstring(wstr,b)
 body=mid(wstr,start,over-start)
response.write ""&body&"" '輸出獲取到的網(wǎng)頁內(nèi)容
'ASP獲取遠程網(wǎng)頁指定內(nèi)容結(jié)束
%>

廣州建網(wǎng)站、廣州做網(wǎng)站
或者將本文《asp獲取遠程網(wǎng)頁的指定內(nèi)容》收藏和分享到:
復制本文《asp獲取遠程網(wǎng)頁的指定內(nèi)容》地址給好友:
桐乡市| 敦煌市| 长岛县| 资溪县| 安仁县| 沽源县| 那坡县| 平阳县| 宜阳县| 汉沽区| 巢湖市| 新宁县| 大英县| 榆林市| 石嘴山市| 塘沽区| 泌阳县| 石城县| 泽州县| 手机| 旺苍县| 清河县| 兴文县| 格尔木市| 定安县| 蓬莱市| 道真| 龙口市| 博白县| 正镶白旗| 九寨沟县| 东丰县| 双流县| 台江县| 衡水市| 沙雅县| 鲁甸县| 大邑县| 榆社县| 韩城市| 田东县|