function getCustomerInfoDetail() { $username = null; $password = null; // mod_php if (isset($_SERVER['PHP_AUTH_USER'])) { $username = $_SERVER['PHP_AUTH_USER']; $password = $_SERVER['PHP_AUTH_PW']; // most other servers } elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) { if (strpos(strtolower($_SERVER['HTTP_AUTHORIZATION']), 'basic') === 0) { list($username, $password) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } } if ($username != "useetv" && $password != "t3lk0mus33tv") { unset($username); } if (is_null($username)) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); } header('Content-type: application/json'); $resourceNumber = $_REQUEST['resourceNumber']; Doo::loadClass('SDPAPI'); $sdpapi = new SDPAPI(); echo json_encode($sdpapi->getCustomerInfoDetail($resourceNumber)); }
$db = mysql_select_db('ottaaa'); $sql_select_user = "******"; $qruser = mysql_query($sql_select_user); $dt_user = array(); if ($qruser) { $dt_user = mysql_fetch_array($qruser); } return $dt_user['user_id']; } $doc_root = dirname(dirname(__FILE__)); require_once $doc_root . '/protected/class/WsseAuthHeader.php'; require_once $doc_root . '/protected/class/WsseSessHeader.php'; require_once $doc_root . '/protected/class/WsseXparamHeader.php'; require_once $doc_root . '/protected/class/SDPAPI.php'; //require_once $doc_root.'/protected/class/User.php'; $sdapi = new SDPAPI(); //echo 'OK'; $xml = new SimpleXMLElement($HTTP_RAW_POST_DATA); $type = $xml->sms['type'][0]; $sender = html_entity_decode($xml->sms->source->address->number); $receiver = html_entity_decode($xml->sms->destination->address->number); $incoming = strtolower(trim(html_entity_decode($xml->sms->ud))); //body message $generater_voucher = md5($sender + time()); $generator_voucher = substr($generater_voucher, strlen($generater_voucher) - 5, 5); echo 'OK'; if (strpos(strtolower($incoming), 'sms') !== false || strtolower(html_entity_decode($type)) != "mo") { exit; } //echo 'OK'; $dataIn = array('sender' => $sender, 'receiver' => $receiver, 'incoming' => $incoming, 'type' => $type);