• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

IP Address Management


█▄█ ▀█▄ █
Political User
I have alot of clients that I need to manage IP Addresses for. They all have DSL or Cable and none of them are static, so once and a great while they change. I have them all trained to visit http://www.whatismyip.com if the address changes and report back to me, so that is all working good. My only question is, if anyone else out there manages alot of IP's, how do you manage them?

Currently I have them in an .xls on my Axim, but I didn't know if anyone else out there had other methods, something that might be easier for me or more convenient. Anyone got some input on that?


Political User
We manage about 200 clients in about the same way. Only difference is, all of our systems are Unix based, and we simply wrote a little cron that runs every 15 min and reports the IP of the client and saves it to a log file. We did put a small piece of code on our website that returns the viewers ip, but that's not much different than whatismyip.com. It is a bit easier for us that way because we put a shortcut to the site on their desktops and they can get to it fairly quickly.


█▄█ ▀█▄ █
Political User
Yeah, I put the shortcut to the URL on the desktop too, I just need the users to report changes. No cron jobs here :)
am assuming an axis is some kind of pda device, if it has mobile connectivity could you not simply have a script on a server somewhere that you get them to go to which then catches the IP address and stores it in a database for you.

Something like a Scheduled Task that runs periodically, something that for example uses MSIE or some scripted version of MSIE that checks a url like http://www.domain.com/ip.php?id=12367834 that would then get the ip address from the $_SERVER['REMOTE_ADDR'] variable and then stores that in a database using the id value. You could then look this up with another script that just dumps the information into a text file that you can read, or into a CSV that you could import into Excel
'cuse the double post, but they are separate really... honest :p
and yeah, I got bored...

When you set them up you goto the add page and add them to the system, this should return you an ip number to use for the client. You would then create a shortcut to open http://www.domain.com/ip.php?id=123

The show page is then able to just dump the information out of the database and output into plain text.

A PHP version might look something like this

SQL Table creation
    name TEXT NOT NULL,
    PRIMARY KEY ( uid )
$sqldb = mysql_connect('localhost','username','password');

$uid = strip_tags(trim($_GET['id']));
$uid = (int)$uid;       // just to make sure its an integer

$uSql = "UPDATE TABLE dsl_ip ( ip ) VALUES ( '{$ip}' ) WHERE uid = '{$uid}'";
$uResult = mysql_query($uSql, $sqldb);

// maybe give them a thankyou message
echo "Thank you";
if ($_POST['submit'] == "Add") {
    $sqldb = mysql_connect('localhost','username','password');
    $desc = strip_tags(trim($_POST['desc']));
    $ip = $_SERVER['REMOTE_ADDR'];
    $iSql = "INSERT INTO dsl_ip ( ip, desc ) VALUES ( '{$ip}', '{$desc}' )";
    $iResult = mysql_query($iSql, $sqldb);
    $uid = mysql_insert_id($iResult);
    echo "Client Added ID is {$uid}";
} else {
$html =<<<EOF
<head><title>Add New Client</title></head>
<form method="post" action="$_SERVER['PHP_SELF']">
<label for="desc">Description: <input type="text" name="desc" size="30"/></label>
<input type="submit" name="submit" value="Add Client"/>
echo $html;
header("Content-Type: text/plain");

$sqldb = mysql_connect('localhost','username','password');

$sSql = "SELECT ip, desc FROM dsl_ip ORDER BY uid ASC";
$sResult = mysql_query($sSql, $sqldb);

while($row = mysql_fetch_array($sResult)) {
    echo "{$row['ip']} - {$row['desc']}\n";


█▄█ ▀█▄ █
Political User
That is crazy dude, did you just write that from scratch in like 10-20 minutes?

In awe of you, reps for just being crazy smart :eek:
yar, just chucked it together, I did forget to mention though that you need to have a database called 'dsl', if its called something else then change the
mysql_select_db('dsl'); to mysql_select_db('name of database');
I don't know if this would help but theres this site called no-ip.org It gives you a url for other people to connect to and then the person runs a program on their system and it keeps track of the persons ip by relaying it to the no-ip site. Maybe you can some how incorporate that into ip tracking.

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member