config->item('mt_service_url'); $username = 'sbg'; $password = 'sbg56ab77cdsgb'; $operator = 'InsertMT'; $operation = 'http://tempuri.org/InsertMT'; $xmlHeader = ''."\n"; $aryParams = array( 'User' => $username, 'Pass' => $password, 'CPCode' => '601', 'UserID' => '841662860000', 'RequestID' => '4', 'ReceiverID' => '84988568786', 'ServiceID' => '8062', 'CommandCode' => 'SBG', 'ContentType' => '0', 'Info' => 'SMS test! - Host: '.$_SERVER['HTTP_HOST'].' - '. date('Y-m-d H:i:s')//'Test MT '. date('Y-m-d H:i:s'), ); $xml = $this->load->view('mt', $aryParams, true); $client = new nusoap_client($url); $client->useHTTPPersistentConnection(); $client->soap_defencoding = 'UTF-8'; $client->operation = $operation; $result = $client->send($xmlHeader.$xml, $operation); $err = $client->getError(); if ($err) { echo '
Error: ' . $err . '
'; } echo "" . htmlspecialchars($client->request, ENT_QUOTES) . ""; echo "
" . htmlspecialchars($client->response, ENT_QUOTES) . ""; } }