ASP Examples

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

ASP Examples

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

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

FTP Upload File

Download 32-bit Chilkat FTP2 ActiveX (.msi)

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

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

Upload a file from an ASP web server to an FTP server.

<HTML>
<HEAD>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=utf-8">
<TITLE>ASP FTP Upload File</TITLE>
</HEAD>
<BODY>

<%
	' Create an FTP object
	set ftp = Server.CreateObject("Chilkat.Ftp2")

	' Any unlock code begins the 30-day trial
	ftp.UnlockComponent "anything"

	ftp.Username = "***"
	ftp.Password = "***"
	ftp.Hostname = "ftp.chilkatsoft.com"

	ftp.KeepSessionLog = 1
	
	ok = ftp.Connect()
	if (ok <> 1) then
		Response.Write ftp.LastErrorHtml
	else
		ok = ftp.ChangeRemoteDir("test")
		' Normally you would check to make sure ok = 1
		
		localFilename = Server.MapPath("/data/pigs.xml")
		remoteFilename = "pigs.xml"
		
		' Upload a file from the ASP web server to an FTP server.
		ok = ftp.PutFile(localFilename, remoteFilename)
		if (ok <> 1) then
			Response.Write "<pre>"
			Response.Write ftp.LastErrorText
			Response.Write Server.HtmlEncode(ftp.SessionLog)
			Response.Write "</pre>"
		else
			Response.Write "File uploaded!"
		end if
	end if

	
	Set ftp = Nothing

%>

</BODY>
</HTML>
 

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