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
Create File on FTP Server from an In-Memory String
Demonstrates how to upload in-memory text data to an FTP server.
set ftp = CreateObject("Chilkat.Ftp2")
ftp.UnlockComponent "any string begins the 30-day trial"
ftp.Username = "***"
ftp.Password = "***"
ftp.Hostname = "ftp.***.com"
ok = ftp.Connect()
if (ok <> 1) then
MsgBox ftp.LastErrorText
end if
' A file on the FTP server named "sampleText.txt" will be created containing
' the text below. The character encoding of the text will be iso-8859-1.
' Other choices for encodings include "utf-8", "ucs-2", "windows-1252", etc.
stringData = "Les Vingt-Cinq s'opposent apr�s les non fran�ais et n�erlandais"
remoteFilename = "sampleText.txt"
ok = ftp.PutFileFromTextData(remoteFilename,stringData,"iso-8859-1")
if (ok <> 1) then
MsgBox ftp.LastErrorText
end if
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.