|
|
@@ -15,7 +15,7 @@ function checkToken($token,$db) {
|
|
|
$dbAction->bind_result($token, $description);
|
|
|
echo "$description" . PHP_EOL;
|
|
|
if ($dbAction->num_rows == 1){
|
|
|
- return true;
|
|
|
+ return "blubb";
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
@@ -25,8 +25,7 @@ function set($ip,$db) {
|
|
|
$dbAction->bind_param('i',$ip);
|
|
|
return $dbAction->execute();
|
|
|
}
|
|
|
-$client = checkToken($token,$db);
|
|
|
-if ($client){
|
|
|
+if (checkToken($token,$db)){
|
|
|
if(set(ip2long($ip),$db)){
|
|
|
echo "$token inserted $ip" . PHP_EOL;
|
|
|
} else {
|