home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 January / macformat-033.iso / mac / Shareware City / Comms / Tricks Folder / Teaching / scripts / date-and-time-02.script < prev    next >
Encoding:
Text File  |  1995-09-02  |  561 b   |  22 lines  |  [TEXT/ToyS]

  1. -- define the standard HTTP header
  2. set LF to ASCII character (10)
  3. set CR to return
  4. set CRLF to CR & LF
  5. set http_10_header to "HTTP/1.0 200 OK" & CRLF & ¬
  6.     "Server: MacHTTP" & CRLF & ¬
  7.     "MIME-Version: 1.0" & CRLF & ¬
  8.     "Content-type: text/html" & CRLF & CRLF
  9.  
  10. -- get the date and time
  11. set theDateAndTime to the (current date) as string
  12.  
  13. -- return the results as an HTML file
  14. return http_10_header & ¬
  15.     "<html>" & ¬
  16.     "<head>" & ¬
  17.     "<title>Hello, Reader</title>" & ¬
  18.     "</head>" & ¬
  19.     "<body>The date and time is " & theDateAndTime & "." & ¬
  20.     "</body" & ¬
  21.     "</html>"
  22.