Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipX.Lib v1.2 - getting started http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Getting Started

What you need:

  o CGI 1.1 Web server
  o Clipper 5.2x
  o A linker
  o ClipX.lib
  o xErrSys.obj

1. Add the following to your link file.

   o Place ClipX.lib in the link file prior to Clipper.lib
   o Place xErrSys.obj in your link file after your program file.
   O Remove any reference to ErrorSys.obj

2. Code your program using X-Hacker.orgfunctions.
   Do not use any command or function which writes to the screen.

   Example 1: Yes, you guessed it, Hello World ( No form input )

    function main()
      if !ClipXOpen()
        Quit
      endif
      header()
      htmlBeg()
      headBeg()
      TitleBeg("My Title")
      TitleEnd()
      headEnd()
      bodyBeg( 'bgcolor="white" ' )
      htmlWrite( "Hello World!" )
      bodyEnd()
      htmlEnd()
      ClipXClose()
    return(NIL)


   Example 2: Accessing a Text Input field from the form.
              Example:
              <INPUT NAME="eMailAddr" TYPE="text" VALUE="me@someDomain.com">

    function main()
      if !ClipXOpen()
        Quit
      endif
      header()
      htmlBeg()
      headBeg()
      TitleBeg("My Title")
      TitleEnd()
      headEnd()
      bodyBeg( 'bgcolor="white" ' )
      htmlWrite( "Hello World!" )
      Br()
      htmlWrite( "Email me at: " + cxCgiValue( "eMailAddr" ) )
      bodyEnd()
      htmlEnd()
      ClipXClose()
    return(NIL)

3. Test your program at the DOS prompt by using ClipXOpen( .t. ).

4. Copy your tested executable to the cgi-bin directory of your web server.

5. Construct an HTML page with a form tag action pointing to your program.

   ...
   ...
   <Form name="Myname" Type="POST" Action="cgi-bin/MyProg.exe" >
   ...
   </Form>
   ...

6. Submit your form and test the results from your program.


See Also: Testing-DOS Testing-WebServer ClipXOpen() xErrSys.obj Functions

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson