FoxPro Examples

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

Visual FoxPro Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
Socket
Spider
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression
Self-Extractor

More Examples...
Amazon S3
DKIM / DomainKey
NTLM
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
FileAccess
Bzip2
LZW

 

Non-Chilkat Links
Text and String Handling

FTP over SSL 3.0 on Port 990

Download 32-bit Chilkat FTP2 ActiveX (.msi)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Visual Foxpro example program showing how to establish an SSL 3.0 secure FTP channel on port 990 and do file uploads and downloads.

* This Visual Foxpro example demonstrates how to do secure FTP uploads and downloads
* using implicit SSL 3.0 on FTP port 990.  This is a less common way of doing secure FTP.
* If the FTP client is behind a network address translating router, such as a typical
* DSL/Cable router, this will not work when the transfer mode is Active, as opposed to Passive.
* The reason is that the router cannot translate the IP address issued in the PORT command
* when setting up the data channel.  To do secure FTP behind a router, use "AUTH TLS"
* instead.  (refer to http://www.example-code.com/foxpro/ftps-visual-foxpro.asp )

LOCAL loFtp, lnSuccess, lcLocalFilename, lcRemoteFilename

loFtp = CreateObject('Chilkat.Ftp2')
loFtp.UnlockComponent('Anything for 30-day trial')

* Set the AuthTls property = false.
ftp.AuthTls = False

* Set Ssl = True and the port must be 990:
ftp.Ssl = True
ftp.Port = 990

loFtp.HostName = "ftp.myHost.com"
loFtp.Username = "myLogin"
loFtp.Password = "myPassword"

lnSuccess = loFtp.Connect()
IF ( lnSuccess = 0 )
	=MESSAGEBOX(loFtp.LastErrorText)
	RELEASE loFtp
	RETURN .T.
ENDIF

* Download a file, keeping the same filename on the FTP server.
lcLocalFilename = "myFile.txt"
lcRemoteFilename = "myFile.txt"
lnSuccess = loFtp.GetFile(lcRemoteFilename, lcLocalFilename)
IF ( lnSuccess = 0 )
	=MESSAGEBOX(loFtp.LastErrorText)
	RELEASE loFtp
	RETURN .T.
ENDIF

* To upload a file, use PutFile instead of GetFile.  Note: the order
* of local/remote filenames is reversed:
lnSuccess = loFtp.PutFile(lcLocalFilename, lcRemoteFilename)
IF ( lnSuccess = 0 )
	=MESSAGEBOX(loFtp.LastErrorText)
	RELEASE loFtp
	RETURN .T.
ENDIF

=loFtp.Disconnect()

RELEASE loFtp

RETURN .T.



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

Mail Component · .NET Email Component · ASP Mail Component · XML Parser