[Lazarus] Lazarus CGI Sample

Leonardo M. Ramé l.rame at griensu.com
Thu May 27 20:36:05 CEST 2010


Hi, I want to show a little example of an CGI app I created this weekend
using Lazarus with a package called FreeSpider, very similar to fpWeb.
It runs on a 512mb of ram Debian i386 server hosted in Argentina in a
shared hosting account. 

The module consists of only two .pas files, one to handle the database
connection, using fcl-db (MySql) and the other to handle the CGI
requests. In total it required approx. 300 lines of code.

Apart from the pascal code, I used four html templates to "draw" the
page header and the modules called home (for the first page), search for
the "search engine" and "aerodromo" to show the airport data sheet.

http://www.aeropuertosarg.com.ar/cgi-bin/aerodromos

To use it simply type part of the name of the airport, or city or IATA
code. For example type "a" and click "buscar" (search in spanish). For
now it only has one airport "Aeroparque de la Ciudad de Buenos Aires",
but it will grow in the future.

It'll show a list of coincidences, then click on one to see it's data
sheet. That's all.

-- 
Leonardo M. Ramé
Griensu S.A. - Medical IT Córdoba
Tel.: 0351-4247979





More information about the Lazarus mailing list