Hypercyber   The boing demon   PATH_INFO

Parametrizing CGI programs: PATH_INFO

There are some very crude ways to parametrize CGI programs The browser or the document author can append information to the URL that points to the CGI program.  E.g., rather than calling
  http://www.cs.tu-berlin.de/cgi/myprog,
you call
  http://www.cs.tu-berlin.de/cgi/myprog/some-string-here.
The executed program is still ``myprog'' in the CGI directory; but it now gets passed "some-string-here" in the Unix environment variable PATH_INFO.

There are lots of other environment variables with information about the host the page is accessed from, the library the browser uses, and ``fields'' (e.g. from a fill-out form) that follow the PATH_INFO part, introduced by a question mark.  Like for many other programmers, my first CGI program was one that printed out all the information it could possibly figure out; try invoking it and see what I know about you.