Header ('HTTP/1.1 200 OK ');
// Set a 404 header:
Header ('HTTP/1.1 404 Not found ');
// Set the address to be permanently redirected
Header ('HTTP/1.1 301 moved permanently ');
// Go to a new address
Header ('location: http://www.example.org /');
// File delay redirection:
Header ('refresh: 10; url = http://www.example.org /');
Print 'you will be redirected in 10 seconds ';
// Of course, you can also use HTML syntax to implement
// <Meta http-equiv = "refresh" content = "10; http://www.example.org //>
// Override X-powered-by: PHP:
Header ('x-powered-by: PHP/4.4.0 ');
Header ('x-powered-by: Brain/0.6b ');
// Document Language
Header ('content-language: en ');
// Tell the browser the last modification time
$ Time = Time ()-60; // or filemtime ($ FN), etc
Header ('Last-modified: '. gmdate ('d, D m y h: I: s', $ time). 'gmt ');
// Tell the browser that the document content has not changed
Header ('HTTP/1.1 304 not modified ');
// Set the Content Length
Header ('content-length: 1234 ');
// Set it to a download type
Header ('content-type: Application/octet-stream ');
Header ('content-Disposition: attachment; filename = "example.zip "');
Header ('content-transfer-encoding: Binary ');
// Load the file to send:
Readfile('example.zip ');
// Disable caching for the current document
Header ('cache-control: No-cache, no-store, Max-age = 0, must-revalidate ');
Header ('expires: Mon, 26 Jul 1997 05:00:00 gmt'); // Date in thepast
Header ('pragma: No-cache ');
// Set the content type:
Header ('content-type: text/html; charset = iso-8859-1 ');
Header ('content-type: text/html; charset = UTF-8 ');
Header ('content-type: text/plain '); // plain text format
Header ('content-type: image/JPEG '); // jpg image
Header ('content-type: Application/zip'); // ZIP file
Header ('content-type: Application/pdf '); // PDF File
Header ('content-type: Audio/MPEG '); // audio file
Header ('content-type: Application/X-Shockwave-flash'); // Flash Animation
// Display the Login Dialog Box
Header ('HTTP/1.1 401 unauthorized ');
Header ('www-Authenticate: Basic realm = "top secret "');