views:

44

answers:

1

How do you ensure early enough in the PHP request pipeline the verb is POST and deny others?

+1  A: 

This should work:

if ($_SERVER['REQUEST_METHOD'] != 'POST') die();
nickf
first one is funny indeed
Col. Shrapnel
@Col. Shrapnel ?
nickf
can't imagine post requests with empty $_POST? ;) a multipart with only file or text/XML for example
Col. Shrapnel
@Col. Shrapnel: If you think that's funny you should check PHPoems, there was only really cool that had commands such as unzip, touch, sleep and so on - can't find it though. =(
Alix Axel