Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grab URL from net to file
#9
Recently I got a program to get the status of a Url download from the .net

Code: (Select All)
' try to read info on url download. pd 2026.
Cls
URL$ = "http://www.applewoodbbs.linkpc.net/files/ifdc/oredson/SPHERE9.ZIP"
x = Download(URL$, outx)
End

Function Download (url As String, StatusCode As Long)
  Dim bytes As Long, Length As Long
  h& = _OpenClient(url)

  StatusCode = _StatusCode(h&)
  Locate 1, 1: Print "Status:"; StatusCode
  Length = LOF(h&)
  Locate 2, 1: Print "LOF:"; Length
  While Not EOF(h&)
      _Limit 60
      Get #h&, , s$
      bytes = bytes + Len(s$)
      percent! = Int((bytes / Length) * 100!)
      percent$ = Right$("000" + LTrim$(Str$(percent!)), 3) + "%"
      Locate 3, 1: Print percent$;
  Wend
  Close #h&
End Function
Reply


Messages In This Thread
Grab URL from net to file - by eoredson - 10-28-2023, 04:30 AM
RE: Grab URL from net to file - by DSMan195276 - 10-28-2023, 04:45 AM
RE: Grab URL from net to file - by eoredson - 10-28-2023, 04:51 AM
RE: Grab URL from net to file - by eoredson - 10-31-2023, 07:22 AM
RE: Grab URL from net to file - by TerryRitchie - 10-31-2023, 01:43 PM
RE: Grab URL from net to file - by eoredson - 11-01-2023, 05:44 AM
RE: Grab URL from net to file - by eoredson - 02-13-2026, 03:03 AM
RE: Grab URL from net to file - by SMcNeill - 02-13-2026, 04:53 AM
RE: Grab URL from net to file - by eoredson - 02-13-2026, 10:41 PM
RE: Grab URL from net to file - by SMcNeill - 02-13-2026, 11:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)