Thread: FoxPro Some General Questions/Catch images from the Web

Catch images from the Web
Original

Lparameters toWeb
Local loImg, lnImg
DECLARE INTEGER URLDownloadToFile IN urlmon Long, STRING, STRING, Long, Long
loImg = toWeb.Document.getElementsByTagName("img")
For lnImg=0 to loImg.Length-1
  If not Empty(loImg.item(m.lnImg).Src)
    URLDownloadToFile(0, loImg.item(m.lnImg).Src, "img"+Transform(m.lnImg)+"."+JustExt(loImg.item(m.lnImg).Src), 0,0)
  EndIf
EndFor