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


Option Explicit

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

  Const adTypeBinary = 1 'Binary
  Const adTypeText   = 2 'Text

  Const adSaveCreateNotExist  = 1
  Const adSaveCreateOverWrite = 2
  HTTPDownload "http://dragon-ark.com/wp-content/uploads/2008/12/20081231_1-300x166.gif" , "c:\test.gif"

 Sub HTTPDownload(ByVal STR_URL, ByVal STR_Path )
    Dim OBJ_ADO
    Dim OBJ_HTTP
    Dim STR_Temp

    Set OBJ_ADO  = CreateObject("ADODB.Stream")

    OBJ_ADO.Type = adTypeBinary
    OBJ_ADO.Open
    OBJ_ADO.Position = 0

    Set OBJ_HTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

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

    STR_Temp = OBJ_HTTP.ResponseBody
    OBJ_ADO.Write STR_Temp
    OBJ_ADO.SaveToFile STR_Path, adSaveCreateNotExist
    OBJ_ADO.Close
End Sub

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

43 Comments

  1. gửi hàng đi mỹ says:

    … [Trackback]

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

  2. gửi hàng đi mỹ says:

    … [Trackback]

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

  3. exchange online plan 1 says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/170 […]

  4. internet bağlantısı kopuyor says:

    … [Trackback]

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

  5. fresh dumps with pin says:

    … [Trackback]

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

  6. HP Servis says:

    … [Trackback]

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

  7. it danışmanlığı says:

    … [Trackback]

    […] There you will find 84045 more Information on that Topic: dragon-ark.com/archives/170 […]

  8. sunucu teknik servis says:

    … [Trackback]

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

  9. kurumsal sunucu yapılandırma says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/170 […]

  10. dark0de market url says:

    … [Trackback]

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

  11. thi công villa tại hội an says:

    … [Trackback]

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

  12. 무료신천지게임 says:

    … [Trackback]

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

  13. 쿠쿠티비 says:

    … [Trackback]

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

  14. free web site creation says:

    … [Trackback]

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

  15. sig sauer p938 says:

    … [Trackback]

    […] Here you will find 94177 additional Info on that Topic: dragon-ark.com/archives/170 […]

  16. kardinal stick says:

    … [Trackback]

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

  17. relx says:

    … [Trackback]

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

  18. Firearms For Sale Near Me says:

    … [Trackback]

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

  19. clubechecs.com says:

    … [Trackback]

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

  20. บาคาร่า1688 says:

    … [Trackback]

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

  21. สล็อตเว็บตรง says:

    … [Trackback]

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

  22. marriott says:

    … [Trackback]

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

  23. et robust familieabonnement says:

    … [Trackback]

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

  24. Retail Phygital Strategy says:

    … [Trackback]

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

  25. Firearms For Sale says:

    … [Trackback]

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

  26. beer777 says:

    … [Trackback]

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

  27. page says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/170 […]

  28. cvv non info says:

    … [Trackback]

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

  29. prima diet reviews says:

    … [Trackback]

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

  30. Online Medications Store says:

    … [Trackback]

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

  31. ขายเฟสบุ๊คยิงแอด says:

    … [Trackback]

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

  32. shop admin cc says:

    … [Trackback]

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

  33. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

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

  34. แทงบอลโลก 2022 says:

    … [Trackback]

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

  35. colourcee.bet says:

    … [Trackback]

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

  36. www.spellcasting.biz/prayer-to-provide/ says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/170 […]

  37. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

    […] There you will find 49625 more Info on that Topic: dragon-ark.com/archives/170 […]

  38. Plant System says:

    … [Trackback]

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

  39. magnum research pistol says:

    … [Trackback]

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

  40. Umzugskartons says:

    … [Trackback]

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

  41. sbo says:

    … [Trackback]

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

  42. สินเชื่อโฉนดที่ดิน says:

    … [Trackback]

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

  43. 5 Tips about Buy shard online in Australia You Can Use Today says:

    … [Trackback]

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

Leave a Reply