I\'m writing an authentication script in PHP, to be called as an API, that needs to return 200only in the case that it approves the request, and403(Forbid
only in the case that it approves the request, and
(Forbid
Since PHP 5.4.0 there is a specialized function:
Just make sure that it's called before any other output.
Reference: