Exemplo n.º 1
0
        echo $ofuz_call_methods->OutputMessage();
    }
}
/*
    API method for searching contact and returning the idcontact
*/
if ($_REQUEST['method'] == "get_contact_id") {
    $api_key = $_REQUEST['key'];
    $format = $_REQUEST['format'];
    if (empty($format)) {
        $format = "xml";
    }
    $ofuz_call_methods = new OfuzApiMethods($format);
    $message_set = true;
    if ($ofuz_call_methods->checkKey($api_key)) {
        if ($ofuz_call_methods->get_contact_id()) {
            $message_set = false;
            echo $ofuz_call_methods->OutputValues();
        } else {
            if ($ofuz_call_methods->OutputMessage() == '') {
                $ofuz_call_methods->setMessage("641", "Error Searching Contact Information");
            }
        }
    }
    if ($message_set) {
        echo $ofuz_call_methods->OutputMessage();
    }
}
/*
    API method for getting all the contacts
*/