You can add headers to the HTTP response in PHP using the
Header() function. Since the response
headers are sent before any of the actual response data, you have to send these
headers before outputting any data. So, put any such header calls at the top
of your script.
Redirection
<?php header('Location: http://www.php.net')?>
Setting a Last-Modified Header
<?php header('Last-Modified: '.
gmdate('D, d M Y H:i:s',getlastmod()).' GMT')?>
Avoid all Caching
<?php
Header('Cache-Control: no-cache, must-revalidate');
Header('Pragma: no-cache');
Header('Expires: Mon,26 Jul 1980 05:00:00 GMT');
?>