I have a web-server and I would like to have the HTTP status code 418 ‘I’m a teapot’ under some conditions, I am sure I would use an if statement, I just can’t seem to get it to trip, any help?
<?php header("HTTP/1.1 418 I'm a teapot"); ?> <html> <h1>418 I'm a teapot</h1><br> <p>The HTCPCP Server is a teapot. The responding entity MAY be short and stout.</p> </html>
Will result in:
418 I’m a teapot
The HTCPCP Server is a teapot. The responding entity MAY be short and stout.