ASP (Active Server Pages) and PHP are server-side scripting languages, sometimes
called CGIs. Other of those scripting languages include JSP (Java Server Pages),
Perl, and plain compiled EXEs.
Basically, you can do everything with them you could do with a normal compiled programming language. You can output imagery, text, script-code, but most often it will be used to deliver HTML to the client.
The following are some uses of CGIs:
- Sending emails from an HTML form the user fills out
- Database-driven websites
- Browser-based news systems
- Keeping track of user movement along the site
- Dynamically building up a navigation, for example by including a part of the HTML, or generating a dynamic menu from XML