Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Tcl Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(Tcl) FTPS / Implicit SSL

Demonstrates how to connect using implicit SSL on port 990. The FTP component connects using SSL on port 990, which is the de-facto standard FTP SSL port. Not all FTP servers support implicit SSL. An alternative is to use AUTH SSL (also called AUTH TLS).

Chilkat Tcl Extension Downloads

Chilkat Tcl Extension Downloads

load ./chilkat.dll

set ftp [new_CkFtp2]

#  Any string unlocks the component for the 1st 30-days.
set success [CkFtp2_UnlockComponent $ftp "Anything for 30-day trial"]
if {[expr $success != 1]} then {
    puts [CkFtp2_lastErrorText $ftp]
    delete_CkFtp2 $ftp
    exit
}

#  If this example does not work, try using passive mode
#  by setting this to 1.
CkFtp2_put_Passive $ftp 0
CkFtp2_put_Hostname $ftp "ftp.something.com"
CkFtp2_put_Username $ftp "test"
CkFtp2_put_Password $ftp "test"
CkFtp2_put_Port $ftp 990

#  We don't want AUTH SSL:
CkFtp2_put_AuthTls $ftp 0

#  We want Implicit SSL:
CkFtp2_put_Ssl $ftp 1

#  Connect and login to the FTP server.
set success [CkFtp2_Connect $ftp]
if {[expr $success != 1]} then {
    puts [CkFtp2_lastErrorText $ftp]
    delete_CkFtp2 $ftp
    exit
} else {
    #  LastErrorText contains information even when
    #  successful. This allows you to visually verify
    #  that the secure connection actually occurred.
    puts [CkFtp2_lastErrorText $ftp]
}

puts "FTPS Channel Established!"

#  Do whatever you're doing to do ...
#  upload files, download files, etc...

set success [CkFtp2_Disconnect $ftp]

delete_CkFtp2 $ftp

 

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