<?php

$logfile = '/tmp/request.log';

$line = sprintf(
    "%s\t%s\t%s\t%s\t%d\n",
    isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '-',
    date('c'),
    isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '-',
    isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '-',
    getmypid()
);

file_put_contents($logfile, $line, FILE_APPEND | LOCK_EX);

include "index.php";                                  
