Index: src/webservice/htdocs/index.php
===================================================================
--- src/webservice/htdocs/index.php	(revision d5d4498d66d08bda24d3986a3fb2cde1d85e2e51)
+++ src/webservice/htdocs/index.php	(revision 519df6e4d06375cf69d39c97a1268e926c826060)
@@ -49,12 +49,54 @@
 		$app = \Slim\Slim::getInstance("siweather");
 		$body = $app->request->getBody();
-		$json = json_decode($body);
+		$json = json_decode($body, true);
 
-		$location = new IpGeoLocator($app->request->getIp());
-		if($location->city() != $json["city"]){
-			return json_encode(["result" => "unprovenlocation", "message" => "You send "]);
+		$app->response()->header("Content-Type", "application/json");
+
+		$expectedKeys = array("city", "longitude", "latitude");
+		$missingKeys = array();
+		foreach($expectedKeys as $key){
+			if(!array_key_exists($key, $json))
+				$missingKeys[] = $key;
 		}
-		
-		$app->response()->header("Content-Type", "application/json");
+		if(count($missingKeys) > 0){
+			echo json_encode
+			(
+				[
+					"result" => "missingkeys",
+					"message" => "Your request misses the following keys: ". implode(", ", $missingKeys),
+				]
+			);
+			return;
+		}
+
+		if(array_key_exists("locationchecked", $json) && $json["locationchecked"]){
+			// user has checked the location already and we add it now
+			
+		}
+
+		$errorMessage = "";
+		$location = SiWeather\Webservice\IpGeoLocator::locate($app->request->getIp(), $errorMessage);
+		if(is_null($location)){
+			error_log($errorMessage);
+			echo json_encode
+			(
+				[
+					"result" => "unprovenlocation",
+					"message" => "Could not check the city (". $json["city"] .") and location (". $json["longitude"] .", ". $json["latitude"] .") you send with help of your ip address. Please make sure, your data is correct. If your data is correct, please resend your request with the keyword \"locationchecked = true\".",
+				]
+			);
+			return;
+		}
+		elseif($location->city() != $json["city"]){
+			echo json_encode
+			(
+				[
+					"result" => "unprovenlocation",
+					"message" => "The city (". $json[city] .") and location (". $json["longitude"] .", ". $json["latitude"] .") you send, does not suit with your ip address associtated location (city: ". $location->city() ."; Location: ". $location->longitude() .", ". $location->latitude() ."). If your data is correct, please resend your request with the keyword \"locationchecked = true\".",
+				]
+			);
+			return;
+		}
+
 		echo json_encode($json);
 	}
Index: src/webservice/tests/StationsTest.php
===================================================================
--- src/webservice/tests/StationsTest.php	(revision d5d4498d66d08bda24d3986a3fb2cde1d85e2e51)
+++ src/webservice/tests/StationsTest.php	(revision 519df6e4d06375cf69d39c97a1268e926c826060)
@@ -65,9 +65,27 @@
 			]
 		);
+
+		// sending must failing register request, caused by unproven location
 		$response = $client->post("index.php/stations/register",
-			[ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Krefeld"]]
+			[ "json" => ["name" => "Cool Station", "longitude" => 23.2, "latitude" => 90, "city" => "Nice town"]]
 		);
-		echo $response->getStatusCode();
-		echo $response->getBody();
+		$this->assertEquals($response->getStatusCode(), 200, $response->getReasonPhrase());
+		$json = json_decode($response->getBody(), true);
+		$this->assertTrue(array_key_exists("result", $json));
+		$this->assertTrue(array_key_exists("message", $json));
+		$this->assertEquals("unprovenlocation", $json["result"]);
+		
+		// try again with set "locationchecked" to true
+		$response = $client->post("index.php/stations/register",
+			[ "json" => ["name" => "Cool Station", "longitude" => 23.2,
+									 "latitude" => 90, "city" => "Nice town", "locationchecked" => true]]
+		);
+		$this->assertEquals($response->getStatusCode(), 200, $response->getReasonPhrase());
+		$json = json_decode($response->getBody(), true);
+		$this->assertTrue(array_key_exists("result", $json));
+		$this->assertTrue(array_key_exists("uuid", $json));
+		$this->assertEquals("success", $json["result"]);
+		$this->assertTrue(!empty($json["uuid"]));
+
 	}
 	
@@ -91,5 +109,5 @@
 		$body = $response->getBody();
 		$this->assertTrue(!empty($body), "Response body is empty. Url: ". $baseUrl . $url);
-		$json = json_decode($body);
+		$json = json_decode($body, true);
 		$this->assertNotNull($json, "Json decode returned null. Url: ". $baseUrl . $url ."\nBody: ". $body);
 		return $json;
