Http / Headers
Headers

First, there is HTTP request from a client. Server decodes the data and send it to PHP interpreter.
Finally, Server send response data to the client.
You can use header() function to overwrite standar headers (must be called before any other output).
<?php
// Most common use of headers is to redirect the user to another page
header("Location: new.com");
You can set php.ini in order to be able to output data even after you send body content.

First, there is HTTP request from a client. Server decodes the data and send it to PHP interpreter.
Finally, Server send response data to the client.
You can use header() function to overwrite standar headers (must be called before any other output).
<?php
// Most common use of headers is to redirect the user to another page
header("Location: new.com");
You can set php.ini in order to be able to output data even after you send body content.