header("HTTP/1.0 404 Not Found"); } } else { header("HTTP/1.0 406 Not Found"); } break; case 'followertodatabase': $followerid = $_GET['follower']; $follow = $_GET['follow']; header('Content-type: application/json'); if ($follow == "Follow") { $user->addFollower($followerid); echo json_encode(array("responce" => "Added follower", "new_status" => "following")); } if ($follow == "unfollow") { $user->removeFollower($followerid); echo json_encode(array("responce" => "Removed follower", "new_status" => "notFollowing")); } break; default: header("HTTP/1.0 404 Not Found"); break; } } else { header("HTTP/1.0 401 Not Found"); } } else { if (isset($_GET['type'])) { switch ($_GET['type']) { case 'authenticationredirect': if (isset($_GET['callbackurl'])) {