function registerSpeedy() { Doo::loadClass('SDPAPI'); $sdpapi = new SDPAPI(); $tm = time(); $password = substr($tm, strlen($tm) - 5, 5); $email = trim($_GET['email']); if (!$email) { $out = array('rs' => false); echo json_encode($out); exit; } if ($_GET['password']) { $password = $_GET['password']; } $fullname = $_GET['fullname']; if (!$fullname) { $fullname = $email; } $param = array('telkomId' => $email, 'email' => $email, 'password' => $password); $outCrt = $sdpapi->createUserProfile($param); $outActive = $sdpapi->activeUser($param); //$url = "http://118.98.96.53/system/createuser?userAccount=".trim($_GET['email'])."&username="******"&password={$password}&userType=1&email={$param['email']}"; $url = "http://www.useetv.com/api/createuser?userAccount=" . $email . "&username="******"&password={$password}&userType=1&email={$param['email']}"; $rs = file_get_contents($url); $output_rs = xmlstr_to_array($rs); $subject = "Selamat datang di UseeTV"; $text = "Anda telah registrasi di useetv.com.<br/>\n\t\t Login anda <b>{$email}</b> dan password <b>{$password}</b>, anda dapat mengganti password melalui website \n\t\t <a href='http://www.useetv.com'>useetv.com</a><br/><br/>\n\t\t \n\t\t Terimakasih,<br/><br/>\n\t\t \n\t\t UseeTV Team\n\t\t "; $rs_acid = explode(';', $outCrt['return']->Result->ResultMessage); if ($rs_acid[1] || $output_rs['Response']['@attributes']['resultCode'] == 1) { $this->sendMailSwift($email, $subject, $text, 3); } $out = array('rs' => true, 'p' => $password, 'acid' => $rs_acid[1], 'output_rs' => $output_rs); echo json_encode($out); exit; }