Visual C++ Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

C++ Examples

CkString
Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
DH Key Exchange
DKIM/DomainKeys
Digital Certificates
Digital Signatures
DSA
Email
Email Object
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

 

 

FTP Session Logging

Downloads:

MS Windows Visual C/C++ Libraries
Linux/CentOS C/C++ Libraries
MAC OS X C/C++ Libraries
Solaris C/C++ Libraries
C++ Builder Libraries
FreeBSD C++ Libraries
HP-UX C++ Libraries
BlackBerry QNX C++ Libraries

How to log the raw commands and responses set to/from an FTP server (i.e. the session log).

// If something does not seem to work, the best course of action
// is to turn on session logging, capture the session log, and then
// send it to support@chilkatsoft.com.  Providing a sample code-snippet
// helps.
void FtpSessionLogging(void)
    {
    CkFtp2 ftp;
    ftp.UnlockComponent("anything for 30-day trial");

    ftp.put_Hostname("ftp.chilkatsoft.com");
    ftp.put_Username("***");
    ftp.put_Password("***");

    // non-passive (active) connections are most likely to work if firewalls are present.
    ftp.put_Passive(false);

    // Turn on session logging.
    ftp.put_KeepSessionLog(true);

    // Connect to the FTP server and login.
    bool success = ftp.Connect();
    if (!success)
	{
	// The error log is separate from the raw FTP session log..
	ftp.SaveLastError("ftpLog.txt");

	// This is were we get the session log, which contains the raw
	// command and responses for all conversations with the FTP server
	// after session logging was turned on.
	CkString sessionLog;
	ftp.get_SessionLog(sessionLog);
	sessionLog.saveToFile("sessionLog.txt","iso-8859-1");

	return;
	}

    success = ftp.PutFile("testUpload.dat","testUpload.dat");
    if (!success)
	{
	// The error log is separate from the raw FTP session log..
	ftp.SaveLastError("ftpLog.txt");

	// This is were we get the session log, which contains the raw
	// command and responses for all conversations with the FTP server
	// after session logging was turned on.
	CkString sessionLog;
	ftp.get_SessionLog(sessionLog);
	sessionLog.saveToFile("sessionLog.txt","iso-8859-1");

	return;
	}

    ftp.Disconnect();
    }

 

 

 

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

Mail Component · .NET Mail Component · XML Parser