Exemple #1
0
if (isset($_REQUEST["action"])) {
    $action = strtolower($_REQUEST["action"]);
    switch ($action) {
        case "get_user_info":
            $value = $api->get_user_info();
            break;
        case "get_nextvideo":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->get_NextVideo($_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "reset_nextvideo":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->reset_NextVideo($_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "set_nextvideo":
            if (isset($_REQUEST["nextvideo"]) && isset($_REQUEST["audience_phone"])) {
                $value = $api->set_NextVideo($_REQUEST["nextvideo"], $_REQUEST["audience_phone"]);
            } else {
                $value = "Missing argument";
            }
            break;
        case "create_user":
            if (isset($_REQUEST["audience_phone"])) {
                $value = $api->create_user($_REQUEST["audience_phone"]);
            } else {