Question

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

Was it helpful?

Solution

This should work:

if ($_SERVER['REQUEST_METHOD'] != 'POST') die();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top