Sample code for 30+ languages & platforms
Visual FoxPro

Example: Http.GetServerCert method

Demonstrates how to call the GetServerCert method.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loHttp
LOCAL loCert

lnSuccess = 0

loHttp = CreateObject('Chilkat.Http')
loCert = CreateObject('Chilkat.Cert')

lnSuccess = loHttp.GetServerCert("chilkatsoft.com",443,loCert)
IF (lnSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loCert
    CANCEL
ENDIF

? loCert.SubjectDN
? loCert.ValidToStr

* Output:

* CN=*.chilkatsoft.com
* Wed, 10 Jun 2026 23:59:59 GMT

RELEASE loHttp
RELEASE loCert