Copy this code and paste it in your HTML
private function getMethod($buffer)
{
$methodStart = strpos($buffer, "\"") + 1;
$methodEnd = strpos($buffer, "\"", $methodStart);
$requestString =
$methodStart,
$methodEnd - $methodStart
);
list($method, $page, $protocol) = split(" ", $requestString);
return $method;
}