Issue:
[moodle-pu.git] / iplookup / index.php
blob68bd95fb97f51644421068cf72bc492397956a6f
1 <?php // $Id$
2 // Do an IP lookup of a user, using selected plugin
4 require('../config.php');
6 require_login();
8 $ip = optional_param('ip', getremoteaddr());
9 $user = optional_param('user', $USER->id);
11 if (empty($CFG->iplookup)) {
12 set_config('iplookup', 'hostip');
15 require("$CFG->dirroot/iplookup/$CFG->iplookup/lib.php");
17 iplookup_display($ip, $user);