Created
May 13, 2009 08:53
-
-
Save arikfr/110940 to your computer and use it in GitHub Desktop.
Teapot the PHP version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
See: http://www.arikfr.com/blog/how-to-create-a-teapot-with-php.html for more details. | |
Thanks to @toolmantim for the inspiration (http://toolmantim.com/articles/im_a_little_teapot) | |
*/ | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'BREW') { | |
header("HTTP/1.1 418 I'm a teapot"); | |
die("We do serve ICE Tea, though.\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment