Get Method (GET/POST) from Lighttpd Log


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. private function getMethod($buffer)
  2. {
  3. $methodStart = strpos($buffer, "\"") + 1;
  4. $methodEnd = strpos($buffer, "\"", $methodStart);
  5.  
  6. $requestString =
  7. substr($buffer,
  8. $methodStart,
  9. $methodEnd - $methodStart
  10. );
  11.  
  12. list($method, $page, $protocol) =
  13. split(" ", $requestString);
  14.  
  15. return $method;
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.