-require_once('header.inc.php');
-$userservice = & ServiceFactory :: getServiceInstance('UserService');
-if ($userservice->isReserved($_GET['username'])) {
- $result = 'false';
-} else {
- $result = $userservice->getUserByUsername($_GET['username']) ? 'false' : 'true';
-}
-?>
-<response>
- <method>isAvailable</method>
- <result><?php echo $result; ?></result>
-</response>
\ No newline at end of file
+$sf = new ServiceFactory();
+$userservice =& $sf->getServiceInstance('UserService');
+echo !($userservice->isReserved($_GET['username']) || $userservice->getUserByUsername($_GET['username']));