title: check every request coming to apacheweb server
body: <p>I have a weird requirement asked , to check time difference between each request and response</p>
  
  <p>I have a PHP file (request.php) serving a image as it's response, so i have to check time difference between GET request.php and GET image request. for each and every request.</p>
  
  <p>For example:</p>
  
  <p>the time request.php is made lets say 12:40 AM</p>
  
  <p>it will response a image, when image is inserted in a web page i get a image request say 12.42 AM.</p>
  
  <p>so my requirement is to calculate time difference between request.php and image every time they hit my server.</p>
  
  <p>I suggested to read Apache access-log but client want me to note request time for every request made and store some where and calculate average between each request on end of the day.</p>
  
  <p>My idea is to read Apache-log and is there a way we can write a php script which will work for every incoming request and check it's timing, probably a custom access-log file.</p>
  
  <p>Any Help!!</p>