<?php
require "../api.php";

$api = new spamhasiApi();

if ($api->checkAuth()) {
    $json["auth"] = true;

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

die(json_encode($json));
?>