ASP Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
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...
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

Download Web Page to MHT with w/ Disk Cache

Downloads a web page into a .mht web archive. Embedded images and style sheets are loaded and/or saved to a disk cache.

Download Chilkat MHT ActiveX

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set mht = Server.CreateObject("Chilkat.Mht")

success = mht.UnlockComponent("30-day trial")
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode("Mht component unlock failed") & "</pre>"

End If

'  Use a single directory to hold cached files.
mht.NumCacheLevels = 0
mht.AddCacheRoot "c:/temp/mhtCache/"

'  Tell the MHT component to save files to cache,
'  and to retrieve from cache if possible:
mht.FetchFromCache = 1
mht.UpdateCache = 1

'  The 1st time this is run, the parts (image files,
'  style sheets, etc.) will be saved to the disk cache.
'  The 2nd time this is run, the parts will load from cache.
'  Note: The main content (i.e. the HTML page)
'  is not saved to cache, nor is it retrieved from cache.
'  It is only the sub-parts (embedded images, style sheets)
'  that are saved to and loaded from cache.
success = mht.GetAndSaveMHT("http://www.intel.com/","intel.mht")

Response.Write "<pre>" & Server.HTMLEncode( mht.LastErrorText) & "</pre>"

If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode("MHT Failed!") & "</pre>"
Else
    Response.Write "<pre>" & Server.HTMLEncode("MHT Created!") & "</pre>"
End If

%>
</body>
</html>

 

Need a specific example? Send a request to support@chilkatsoft.com

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