Sample code for 30+ languages & platforms
Lianja

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 Lianja Downloads

Lianja
llSuccess = .F.

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loHttp = createobject("CkHttp")

loHttp.SetRequestHeader("Host","chilkatsoft.com")

lcLocalFilePath = "/temp/hamlet.zip"
llSuccess = loHttp.Download("http://107.180.46.206:80/hamlet.zip",lcLocalFilePath)
if (llSuccess <> .T.) then
    ? loHttp.LastErrorText
    release loHttp
    return
endif

? "OK!"


release loHttp