<?php // register a public ip // call this page during your computer init sequence so i can register its public ip header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; $IP = new IP\IP(); $ip = $_SERVER['REMOTE_ADDR']; $name = @$_GET['name']; if (!$name) { die('name?'); } if ($IP->registerIp($ip, $name)) { echo 'ok'; }
header('Content-Type: text/html; charset=utf-8'); session_start(); require __DIR__ . "/../../vendor/autoload.php"; $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; $admin = new LTE\AdminLte2(); $admin->config()->title = $REMOTE_ADDR; echo $admin; // $IP = new IP\IP(); ?> <section class="content-header"> <h1><i class='fa fa-chevron-right'></i> Register</h1> </section> <section class='content'> <?php $ip = $_SERVER['REMOTE_ADDR']; $NAME = @$_GET['name']; if (!$NAME) { $NAME = 'Anonymous'; } if ($IP->registerIp($ip, $NAME)) { echo new LTE\Callout("success", "<i class='fa fa-check'></i> Success", "Ip '{$ip}' registered successfuly"); echo "<a href='http://ip.jambonbill.org' class='btn btn-default'>ip.jambonbill.org</a>"; //die("Ip '$ip' registered successfuly"); exit; } else { echo new LTE\Callout("danger", "Error", "Error registering ip"); exit; }