Hour 21. Handling Other Content Types

Throughout this book so far, the CGI programs have produced HTML output. As you know, though, a CGI program can produce any kind of output. You can use CGI programs to dynamically serve images, to stream content to users, and to authenticate users before letting them download files. In this lesson, you’ll learn:

  • How to set the proper content type for the content that you’re serving

  • How to send binary data from a CGI program

  • How to authenticate users before allowing them to download files

  • How to create a simple ad server

  • How to track users using images

Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.