home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 37
/
hot37.iso
/
FICHEROS
/
LVB
/
CGIT201.ZIP
/
DEMOCGI.BA_
/
DEMOCGI.BA
Wrap
Text File
|
1998-06-08
|
2KB
|
31 lines
Attribute VB_Name = "modCGI"
'VB5-CGI Objects script example: demoCGI.bas
'Copyright 1997, 1998 EazyWare - http://www.eazyware.com/vb5-cgi
'---------------------------------------------------------------
'Shows the basic functionalities of the VB5CGI object.
'---------------------------------------------------------------
Option Explicit
Private CGI As New VB5CGI.clsCGI 'Instance the VB5CGI Object (needs VB5CGI.DLL)
Sub Main()
Dim msg As String 'String variable for HTML text
With CGI 'We use the VB5CGI object
.DebugLogMode = cgiDebugAll 'Enable debugging to file CGIdebug.log
If Len(.GetQueryString) > 0 Then 'Did we receive a Query String?
.SetCookie "Name1", "Value1" 'Send the first cookie
.SetCookie "Name2", "Value2" 'Send the second cookie
msg = "<HTML><TITLE>VB5HTML demonstration [" & .GetScriptName(True) & "]</TITLE>" & _
"<BODY>The Query String you sent with the " & .EnvRequestMethod & _
" method is: " & .GetQueryString() & "<BR><P>" & _
"If you allow cookies, the second cookie value will be next time: " & _
.GetCookieValue("Name2") & "<BR><P>" & _
"Page access: " & .GetHitCounterInc(App.EXEName) & "</BODY></HTML>"
.StdOutput .GetHTTPHeader & msg 'Submit the page with the HTTP-header
Else
.DumpEnvInfo 'Dump the environment variables and VB5CGI information
End If
End With
End Sub