Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
HTTP Download Binary File (.zip, .gif, .pdf, etc.) and Save to FileDownloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries 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");
}
}
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.