This question already has an answer here:
- PHP: How to send HTTP response code? 7 answers
Is there a way to have a php script return a specific http status code rather than relying on apache to do it?
This question already has an answer here:
Is there a way to have a php script return a specific http status code rather than relying on apache to do it?
You can set header values manually with php, for example:
http://php.net/header