By sending an image / gif content-type using header(), you can create a PHP script that outputs GIF images directly.
The filename argument is optional, and if left off, the raw image stream will be output directly. By sending an image/gif content-type using header(), you can create a PHP script that outputs GIF images directly.