function submitSpeedyInstant() { Doo::loadClass('SDPAPI'); $sdpapi = new SDPAPI(); $param = array('telkomId' => $_GET['username'], 'email' => $_GET['email'], 'password' => $_GET['pass']); $outCrt = $sdpapi->createUserProfile($param); $outActive = $sdpapi->activeUser($param); //$url = "http://{$this->api_host}/system/createuser?userAccount=".trim($_GET['username'])."&username="******"&password={$param['password']}&userType=1&email={$param['email']}"; $url = "http://{$this->new_api_host}/api/createuser?userAccount=" . trim($_GET['username']) . "&username="******"&password={$param['password']}&userType=1&email={$param['email']}"; $sent = @file_get_contents($url); //$urlBinding = "http://{$this->api_host}/system/bindaccount?userAccount={$_GET['username']}&billingAccount={$_GET['nospeedy']}"; $urlBinding = "http://{$this->new_api_host}/api/bindaccount?userAccount={$_GET['username']}&billingAccount={$_GET['nospeedy']}"; $sentBinding = @file_get_contents($urlBinding); $rs_acid = explode(';', $outCrt['return']->Result->ResultMessage); $paramMapping = array('AccountID' => $rs_acid[1], 'ProductName' => 'SPINSCARD', 'CreatedBy' => 'USEETV', 'ProductPackage' => 1, 'ProductDesc' => 'spins card', 'ProductStatus' => 1, 'UserTS' => $_GET['nospeedy'], 'PasswordTS' => 'USEETV', 'Relation' => 1); $outMapping = $sdpapi->addUserMapping($paramMapping); $out = array('rsu' => $sent, 'rsp' => $outCrt, 'paramMapping' => $paramMapping, 'rsm' => $outMapping); $subject = "Selamat datang di UseeTV"; $text = " Selamat anda berhasil registrasi account di useetv.com.<br/>\n\t\t Login anda <b>{$_GET['username']}</b> dan password <b>{$_GET['pass']}</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 "; $this->sendMailSwift($_GET['email'], $subject, $text, 3); echo json_encode($out); exit; }