Link to home
Start Free TrialLog in
Avatar of boss302_lp
boss302_lp

asked on

Winsock control

I know this question has probably been asked a million times, but i am looking for an easy way to download a file (such as an executable) from the web. It'd be nice if it supported ftp and http.
I only need it to gather from one source, but would like to make the downloads resumable. And if possible, but i could figure this out, source to incorporate a speed (___KB/sec) and a progress bar.
any help would be greatly appreciated

sorry that 60 points is all i can give
Avatar of GivenRandy
GivenRandy

To download a file using the WebBrowser:

---
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Private Sub Command1_Click()
    URLDownloadToFile 0, "https://www.experts-exchange.com", "YourFileName", 0, 0
End Sub
---
You should be able to connect with winsock on port 80 to like www.site.com
then use the get command to get the file like
sendmessage "GET /FILE.EXT"
ASKER CERTIFIED SOLUTION
Avatar of n_narayanan
n_narayanan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of boss302_lp

ASKER

sorry i have been away for a while, but thanks for your help