Drupal web page logging
Create a custom module, for example:

MODULENAME.install file with hook_schema() implementation:

&lt;?php

/**
 * Implements hook_schema()
 */
function MODULENAME_schema() {
  $schema['MODULENAME'] = array(
    'description' =&gt; 'Description of the table.',
    'fields' =&gt; array(
      'timestamp' =&gt; array(
        'description' =&gt; 'Timestamp of the rquest.',
        'type' =&gt; 'int',
        'unsigned' =&gt; TRUE,
        'not null' =&gt; TRUE,
      ),
      // definitions for the rest of fields here
    ),
    'indexes' =&gt; array(
      // define indexes
    ),
    'primary key' =&gt; array('NAME_OF_PRIMARY_KEY_FIELD'),
  );
  return $schema;
}

?&gt;


MODULENAME.module file with hook_menu() implementation:
    

/**
 * Implements hook_menu()
 */
function MODULENAME_menu() {
  $items['page-name'] = array(
    'title' =&gt; 'Example title',
    'access callback' =&gt; TRUE, // imply no restrictions
    'type' =&gt; MENU_CALLBACK,
    'page callback' =&gt; 'MODULENAME_pagename_view',
  );
  return $items;
}

function MODULENAME_pagename_view() {
  global $user;
  // insert into Drupal database
  db_insert('MODULENAME')
    -&gt;fields(array(
      'timestamp' =&gt; REQUEST_TIME,
      'user_id' =&gt; $user-&gt;uid,
      'url' =&gt; $_GET['url'],
      'redirect' =&gt; $_GET['redirect'],
      'uid2' =&gt; $_GET['uid2'],
    ))
    -&gt;execute();
}

?&gt;