Winhttpでhttpリクエストを行い、Cドライブ直下に”test.txt”というファイルにリクエスト結果を保存する例です。


Option Explicit

  Const OpenFileForReading   = 1
  Const OpenFileForWriting   = 2
  Const OpenFileForAppending = 8

  HTTPDownload "http://google.co.jp/index.html" , "c:\text.txt"
Sub HTTPDownload(ByVal STR_URL, ByVal STR_Path )
    Dim OBJ_File
    Dim OBJ_FSO
    Dim OBJ_HTTP

    Set OBJ_FSO  = CreateObject("Scripting.FileSystemObject")
    Set OBJ_File = OBJ_FSO.OpenTextFile(STR_Path, OpenFileForWriting, True)
    Set OBJ_HTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

    OBJ_HTTP.Open "GET", STR_URL, False
    OBJ_HTTP.Send

    OBJ_File.Write  OBJ_HTTP.ResponseText
    OBJ_File.Close( )
End Sub

Scriptのダウンロードは こちら です。

18 Comments

  1. daftar slot says:

    … [Trackback]

    […] Find More Info here to that Topic: dragon-ark.com/archives/164 […]

  2. arvest central mortgage co says:

    … [Trackback]

    […] Read More Information here on that Topic: dragon-ark.com/archives/164 […]

  3. microsoft exchange hosting fiyat says:

    … [Trackback]

    […] Read More here to that Topic: dragon-ark.com/archives/164 […]

  4. internet teknik servis says:

    … [Trackback]

    […] Read More Information here to that Topic: dragon-ark.com/archives/164 […]

  5. bell & ross replica says:

    … [Trackback]

    […] Here you can find 18137 more Info to that Topic: dragon-ark.com/archives/164 […]

  6. exchange online plan 1 says:

    … [Trackback]

    […] Find More on on that Topic: dragon-ark.com/archives/164 […]

  7. HP Server Teknik Destek says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/164 […]

  8. W88 says:

    … [Trackback]

    […] There you will find 98635 more Info to that Topic: dragon-ark.com/archives/164 […]

  9. exchange mail says:

    … [Trackback]

    […] Here you will find 13848 more Info to that Topic: dragon-ark.com/archives/164 […]

  10. it danışmanlık ücretleri says:

    … [Trackback]

    […] Read More to that Topic: dragon-ark.com/archives/164 […]

  11. hack instagram account says:

    … [Trackback]

    […] Find More on to that Topic: dragon-ark.com/archives/164 […]

  12. lenovo servis says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/164 […]

  13. darkode market url says:

    … [Trackback]

    […] Find More here on that Topic: dragon-ark.com/archives/164 […]

  14. site to buy dumps with pin says:

    … [Trackback]

    […] Find More here on that Topic: dragon-ark.com/archives/164 […]

  15. greatdumps cc says:

    … [Trackback]

    […] Information on that Topic: dragon-ark.com/archives/164 […]

  16. 1:Buy DMT Online 2:Buy DMT 3:Buy DMT bulk order 4:where to buy DMT 5:DMT crystals for sale says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/164 […]

  17. 1p lsd says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/164 […]

  18. TKO Extracts is a recreational cannabis & Medical Marijuana Online Dispensary says:

    … [Trackback]

    […] There you can find 5061 additional Information to that Topic: dragon-ark.com/archives/164 […]

Leave a Reply