超碰牛牛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)容》地址給好友:
铅山县| 乐安县| 宝兴县| 布尔津县| 台南县| 开原市| 托克逊县| 宝兴县| 萨迦县| 西丰县| 桓台县| 桐梓县| 昌江| 康保县| 抚宁县| 延津县| 海宁市| 西乌珠穆沁旗| 泽库县| 疏勒县| 天峨县| 蕉岭县| 吉安市| 敖汉旗| 泸州市| 栖霞市| 改则县| 佛冈县| 大兴区| 澄江县| 盱眙县| 林芝县| 威信县| 湟源县| 博乐市| 武安市| 临沂市| 伊川县| 汝南县| 资兴市| 上饶市|