ASP Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++DelphiFoxProJavaPerlPythonRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
S/MIME
Socket
Spider
RSA Encryption
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

HTTP HEAD Request

Simple HTTP HEAD request to download only the HTTP header.

Download Chilkat HTTP ActiveX

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

'  Any string unlocks the component for the 1st 30-days.
success = http.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
    Response.Write http.LastErrorText & "<br>"

End If

'  Create a HEAD request for a URL:
set req = Server.CreateObject("Chilkat.HttpRequest")
req.UseHead 
req.SetFromUrl "http://www.chilkatsoft.com/"

'  Send the HEAD request and get the response.

'  Call SynchronousRequest to send the HTTP request and get
'  the response.

'  It's seemingly dumb that you would need to specify the
'  domain, port and ssl separately in the call to SynchronousRequest.
'  However, in some cases the contents of the HTTP request may be different
'  than the address/protocol of where it is sent.  Usually this
'  isn't the case.  So for "http://www.chilkatsoft.com", the
'  domain = "www.chilkatsoft.com", the port is 80, and we
'  are not using SSL:

port = 80
domain = "www.chilkatsoft.com"
ssl = 0
Set response = http.SynchronousRequest(domain,port,ssl,req)

If (response Is Nothing ) Then
    Response.Write http.LastErrorText & "<br>"
Else

    '  Show the HTTP response code and header received.
    Response.Write "HTTP response code: " & "<br>"
    Response.Write response.StatusCode & "<br>"

    Response.Write "---- FULL HEADER ----" & "<br>"
    Response.Write response.Header & "<br>"
    Response.Write "---------------------" & "<br>"

End If

%>
</body>
</html>

 

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

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