Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

 

HTTP Download Binary File (.zip, .gif, .pdf, etc.) and Save to File

C++ source code to download any kind of file (binary or text, including .html files) via HTTP and save to a file.

void DownloadBinary(void)
    {
    // HTTP Download a binary file (.gif, .zip, .pdf, etc.) and save to a file.
    CkHttp http;

    // Unlock once at the beginning of your program.
    http.UnlockComponent("Anything for 30-day trial");

    CkByteData binaryData;
    bool success = http.QuickGet("http://www.chilkatsoft.com/images/dude.gif",binaryData);

    // Save the binary data to a file
    if (success)
	{
	binaryData.saveFile("dude.gif");
	}
    else
	{
	http.SaveLastError("httpError.xml");
	}

    }


 

 

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Mail Component · XML Parser