Visual FoxPro
Visual FoxPro
HTTP Download from URL with IP Address and Port
See more HTTP Examples
Downloads a file from a URL using an IP address and port.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loHttp
LOCAL lcLocalFilePath
lnSuccess = 0
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat.Http')
loHttp.SetRequestHeader("Host","chilkatsoft.com")
lcLocalFilePath = "/temp/hamlet.zip"
lnSuccess = loHttp.Download("http://107.180.46.206:80/hamlet.zip",lcLocalFilePath)
IF (lnSuccess <> 1) THEN
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
? "OK!"
RELEASE loHttp