Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
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.