Marco's Web Center

Menu for Development

Site Menu
Object Pascal Handbook
Delphi Handbooks Collection
Mastering Borland Delphi 2005
(Old) White Papers
(Old)Tools
(Old) Conferences

My Other Sites
Italian Site (www.marcocantu.it)
the delphi search

Spirit of delphi

Advertising
Home My Blog Books Object Pascal Marco

Home: Code Repository: Mastering Delphi 6

Chapter 22 - Project CgiDate

Project Structure

CgiDate.dpr
program CgiDate;

{$APPTYPE CONSOLE}

uses
  SysUtils;

begin
  writeln ('content-type: text/html');
  writeln;
  writeln ('<html><head>');
  writeln ('<title>Time at this site</title>');
  writeln ('</head><body>');
  writeln ('<h1>Time at this site</h1>');
  writeln ('<h2>');
  writeln (FormatDateTime(
    '"Today is " dddd, mmmm d, yyyy, ' +
    '"<br> and the time is" hh:mm AM/PM',
     Now));
  writeln ('</h2>');
  writeln ('<hr><i>Page generated by CgiDate.exe</i>');
  writeln ('</body></html>');
end.