From 7ec2132823cf7728efa4043840106b9eb9bba824 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 5 Aug 2008 19:44:44 +0000 Subject: Central: Added automatic IP address update Now, every time the Client contacts the Central Server, the Central Server checks to see if its IP address has changed, and if it has, the Central Server updates it in its records. Refs #21. --- central/trunk/instadisc.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'central') diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 519070f..5da1d54 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php @@ -33,6 +33,12 @@ function instaDisc_checkVerification($username, $verification, $verificationID, $insverid = "INSERT INTO oldVerID (username, verID) VALUES (\"" . mysql_real_escape_string($username) . "\", " . $verificationID . ")"; $insverid2 = mysql_query($insverid); + if (($table == 'users') && ($getitem3['ip'] != $_SERVER['REMOTE_ADDR'])) + { + $setuser = "UPDATE users SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\" WHERE id = " . $getitem3['id']; + $setuser2 = mysql_query($setuser); + } + return true; } } -- cgit 1.4.1