Re: CGI?
Re: CGI?
- Subject: Re: CGI?
- From: cris <email@hidden>
- Date: Tue, 17 Apr 2001 00:02:15 +0200
on 13.04.2001 22:05 Uhr, Michelle Steiner at email@hidden wrote:
>
On 4/13/01 11:13 AM, cris <email@hidden> wrote:
>
>
>>> At the end of the handler you have to return back something to the
>
webserver
>
>>> (which will pass it to the browser). You need to specify the type of
>
>>> response in the header. In this case it will be a '200 OK' which looks so:
>
>>>
>
>>> property CRLF : (ASCII character 13) & (ASCII character 10)
>
>>> property http_OK_header : "HTTP/1.0 200 OK" & CRLF & "Server: MacHTTP" &
>
>>> CRLF & "MIME-Version: 1.0" & CRLF & "Content-type: text/html" & CRLF & CRLF
>
>>
>
>> This goes in the header of the HTML page?
>
> Yes, the HTML page created within your CGI, passed to the webserver which
>
> will send it to the browser.
>
>
I think I understood up to here, and after it, but what HTML page created
>
within my CGI?
>
>
Is the CGI the Applescript?
>
>
It's just not making sense to me at all.
A good start to get the basics of how it works is to read Jon Widerspan's
tutorial, i mentioned in the first reply.
The CGI is the AppleScript, yes.
When a CGI i called from the browser you mostly want to have a response page
displayed. This page must be created by the CGI itself in any way. You can
have the HTML code you want to use for the respnse page directly in a
variable, or you can fill that variable with a HTML file on disk via the
'read file' command.
And then you need to combine the dynamic part, created by the CGI (your
counter value) with that static part(s) from your variable(s) which hold the
HTML code.
There are several ways to do that, search and replace for example.
Greetings
cris :-)
--
English is my second language.
www.cooc.de
References: | |
| >Re: CGI? (From: Michelle Steiner <email@hidden>) |