Board index » delphi » cgi in turbo pascal or freepascal in windows 95
dbas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
dbas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
cgi in turbo pascal or freepascal in windows 95
Could someone please post some simple code in turbo pascal or freepascal
that will do cgi in windows 95? Thank you |
Jonas Maeb
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95In article <391BA598.A750A...@enztecNOS.PAMorg>, dbask Quote<db...@enztecNOS.PAMorg> wrote: <http://www.freepascal.org/fpc-linux/cgi/uncgi-2.0.11.tar.gz>. It works both on windows and linux. Jonas |
Garry Woo
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95In article <391BA598.A750A...@enztecNOS.PAMorg>, dbask <db...@enztecNOS.PAMorg> wrote: Quote> Could someone please post some simple code in turbo pascal or EZCGI.PAS. This unit does all the CGI basics and it works on Windows or Linux. I've used it and it works really well with Apache (and probably any other web server that supports standard CGI). Garry. Sent via Deja.com http://www.deja.com/ |
Marco van de Voo
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95Quote> dbask <db...@enztecNOS.PAMorg> wrote: |
dbas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95QuoteJonas Maebe wrote: complicated for me to make any use out of it at the present time. :( Would you happen to have a 'Hello World' level freepascal or tpc CGI Thank you, |
Marco van de Voor
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95Quote> > > Could someone please post some simple code in turbo pascal or freepascal ported from linux) implements a BMP counter. I chose for BMP because it is a simple format, but some older browsers program cntbmp; HTML query (different variables) not implemented yet. Need to uses strings, const max_data = 1000; type datarec = record bmpheadtype = packed record {Headers for BMP. Putting them in one Quote} bisize: longint; { length of this header, $28 Quote} biheight: longint; { pixel height } biplanes: word; { = 1 } bibitcount: word; { color bits per pixel } bicompression: longint; { = 0 for no compression } bisizeimage: longint; { = bfsize - bfoffbits } bixpel{*word*237}eter: longint; { x pixels per meter } biypel{*word*237}eter: longint; { y pixels per meter } biclrused: longint; { \ I have never seen these } biclrimportant: longint; { / two used for anything } end; { 10 characters (character 0..9) , 12x8 dimension CONST Font : ARRAY[0..119] OF BYTE= ( VAR data : array[1..max_data] of datarec; begin if StrComp(GetEnv('REQUEST_METHOD'),'GET')<>0 then Writeln ('Content-type: image/x-MS-bmp'); Assign (f,'count'); {Set up BMP-header} FillChar(hdr,SIZEOF(Bmpheadtype),0); {Output BMP-header to standard out} BytePtr:=@Hdr; {Output colors/palette} Write(#255,#255,#255,#0,#0,#0,#0,#0); { Split up into digits} Thousands:=Count DIV 1000; Count:=Count MOD 1000; { Print bitmapdata} FOR Rows := 11 DOWNTO 0 DO { Rows loop} |
dbas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95Quotedbask wrote: pascal (turbo pascal, freepascal and console delphi pascal dialect) because of pascal's great string handling functions, ease of programming and small and fast exe's. All of which make it a great programming language for use in cgi programming. The first 'Hello World!' cgi program I compiled was the following Turbo #include <iostream> Quote} delphi pascal dialect 'Hello World!' cgi program : program cgi1; Then into the following ADA 'Hello World' cgi program : With Text_IO; Use Text_IO; The Html code that calls the cgi is : <!-html for cgi-> Of course these programs are completely stripped down stdin/stdout A cgi 'Hello World' program is very useful to test whether the web Thank you to Jonas Maebe, Garry Wood, and Marco van de Voort for With freepascal running on both Windows and Linux it is the way to go. |
sking9..
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95Quote> I translated it into the following turbo pascal, freepascal and to specify end-of-line. Like so program cgi1; Quote> With freepascal running on both Windows and Linux it is the way to go. Before I go any further I must admit that I am biased becuase I am the author of Irie Pascal but I think it is worth considering. The website is www.irietoools.com. The current version of Irie Pascal has a problem with If you are at all interested then you can contact me PS: Irie Pascal also runs on both Windows and Linux. Stuart Sent via Deja.com http://www.deja.com/ |
Robert Dewa
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95In article <8fo2aq$6g...@nnrp1.deja.com>, Quotesking9...@my-deja.com wrote: comp.lang.ada, since as far as I can tell this thread has zero Ada content??? Sent via Deja.com http://www.deja.com/ |
dbas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cgi in turbo pascal or freepascal in windows 95In the user manual in the fpc manual section "9.1.1 Data coming through standard input." there is some "Post Method" CGI code there. Could someone from fpc tell me why they are checking for '\'? (see code while not eof(input) do Also are there any buffer overflow concerns using fpc or tpc in CGI thanks, |
1. cgi in turbo pascal or freepascal in windows 95
2. cgi in turbo pascal or console delphi for windows 95
3. Turbo Pascal for Windows doesn't quite work w/ Win 95
4. Using Turbo Pascal version 5.5 in Windows 95
5. Turbo Pascal 6 and Windows 95 (Dos Mode)
6. Missing PRNFLTR for Turbo Pascal 7.0 on Windows 95/98
7. Windows (95) + Turbo Pascal 6.0
8. Turbo Pascal 7.0, Ctrl/Brk and windows 95