Create a custom module, for example:
MODULENAME.install
file with hook_schema()
implementation:
<?php
/**
* Implements hook_schema()
*/
function MODULENAME_schema() {
$schema['MODULENAME'] = array(
'description' => 'Description of the table.',
'fields' => array(
'timestamp' => array(
'description' => 'Timestamp of the rquest.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
// definitions for the rest of fields here
),
'indexes' => array(
// define indexes
),
'primary key' => array('NAME_OF_PRIMARY_KEY_FIELD'),
);
return $schema;
}
?>
MODULENAME.module
file with hook_menu()
implementation:
/**
* Implements hook_menu()
*/
function MODULENAME_menu() {
$items['page-name'] = array(
'title' => 'Example title',
'access callback' => TRUE, // imply no restrictions
'type' => MENU_CALLBACK,
'page callback' => 'MODULENAME_pagename_view',
);
return $items;
}
function MODULENAME_pagename_view() {
global $user;
// insert into Drupal database
db_insert('MODULENAME')
->fields(array(
'timestamp' => REQUEST_TIME,
'user_id' => $user->uid,
'url' => $_GET['url'],
'redirect' => $_GET['redirect'],
'uid2' => $_GET['uid2'],
))
->execute();
}
?>
/page-name
or calls for all pages on the site, that include this parameters?/page-name
including this parameters