• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • ASP HTTP 使用范例

    發表于:2007-06-30來源:作者:點擊數: 標簽:
    簡單實例: 使用這個組件十分簡單 1.創建對象 2.設定一些屬性 3.調用GetUrl方法 下面是 vb script使用AspHTTP的示例代碼 Set HttpObj = Server.CreateObject(AspHTTP.Conn) HttpObj.Url = http://www.myfinancialpage.com/qrtresults.html strResult = HttpOb
    簡單實例:
    使用這個組件十分簡單
    1.創建對象
    2.設定一些屬性
    3.調用GetUrl方法

    下面是vbscript使用AspHTTP的示例代碼

    Set HttpObj = Server.CreateObject("AspHTTP.Conn")
    HttpObj.Url = "http://www.myfinancialpage.com/qrtresults.html"
    strResult = HttpObj.GetURL
    變量strResult現在包含一個字符串從http://www.myfinancialpage.com/qrtresults.html
    GET獲得的文檔結果

    實例:獲得GIF文件
    <%
    rem This demo pulls a GIF image from www.microsoft.com
    Server.ScriptTimeout = 240
    Set HttpObj = Server.CreateObject("AspHTTP.Conn")
    HttpObj.Url = "http://www.microsoft.com/library/images/gifs/toolbar/write.gif"
    HttpObj.FollowRedirects = false
    HttpObj.RequestMethod = "GET"
    HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"
    HttpObj.SaveFileTo = "c:\write.gif"
    HttpObj.GetURL
    Response.Write "<hr><h3>Headers Received</h3><pre>" & HttpObj.Headers & "</pre>"
    %>

    實例:處理和顯示URL包含的HREF
    <html>
    <body>
    <%
    Server.ScriptTimeout = 240
    Set HttpObj = Server.CreateObject("AspHTTP.Conn")
    HttpObj.Url = "http://www.genusa.com/asp/tools.html"
    HttpObj.RequestMethod = "GET"
    HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"
    strResult = HttpObj.GetURL
    Response.Write "<h2>A HREF List</h2>"
    varHREFArray = HttpObj.GetHREFs
    intHREFArrayLimit = UBound(varHREFArray) -1
    For I = 0 to intHREFArrayLimit
    Response.Write varHREFArray(I) & "<br>" & VBCrLF
    Next
    %>
    </body>
    </html>

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>