checkAuth()) { $json["auth"] = true; if ($api->checkLogin()) { $json["method"] = "cookie"; }else{ $json["method"] = "api_key"; } }else{ $json["auth"] = false; } die(json_encode($json)); ?>