當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SoapClient::GetCredit方法代碼示例

本文整理匯總了PHP中SoapClient::GetCredit方法的典型用法代碼示例。如果您正苦於以下問題:PHP SoapClient::GetCredit方法的具體用法?PHP SoapClient::GetCredit怎麽用?PHP SoapClient::GetCredit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SoapClient的用法示例。


在下文中一共展示了SoapClient::GetCredit方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SendSms

function SendSms($textMessage, $toNumber)
{
    // turn off the WSDL cache
    ini_set("soap.wsdl_cache_enabled", "0");
    try {
        $user = sms_config::$username;
        $pass = sms_config::$password;
        $client = new SoapClient(sms_config::$send_server);
        $getcredit_parameters = array("username" => $user, "password" => $pass);
        $credit = $client->GetCredit($getcredit_parameters)->GetCreditResult;
        echo "Credit: " . $credit . "<br />";
        $encoding = "UTF-8";
        //CP1256, CP1252
        $textMessage = iconv($encoding, 'UTF-8//TRANSLIT', $textMessage);
        $sendsms_parameters = array('username' => $user, 'password' => $pass, 'from' => "50001333837392", 'to' => array($toNumber), 'text' => $textMessage, 'isflash' => false, 'udh' => "", 'recId' => array(0), 'status' => 0);
        $status = $client->SendSms($sendsms_parameters)->SendSmsResult;
        echo "Status: " . $status . "<br />";
        $getnewmessage_parameters = array("username" => $user, "password" => $pass, "from" => "50001333837392");
        $incomingMessagesClient = new SoapClient(sms_config::$receive_server);
        $res = $incomingMessagesClient->GetNewMessagesList($getnewmessage_parameters);
        print_r($res);
        echo "<table border=1>";
        echo "<th>MsgID</th><th>MsgType</th><th>Body</th><th>SendDate</th><th>Sender</th><th>Receiver</th><th>Parts</th><th>IsRead</th>";
        foreach ($res->GetNewMessagesAResult->Message as $row) {
            echo "<tr>" . "<td>" . $row->MsgID . "</td>" . "<td>" . $row->MsgType . "</td>" . "<td>" . $row->Body . "</td>" . "<td>" . $row->SendDate . "</td>" . "<td>" . $row->Sender . "</td>" . "<td>" . $row->Receiver . "</td>" . "<td>" . $row->Parts . "</td>" . "<td>" . $row->IsRead . "</td>" . "</tr>";
        }
        echo "</table>";
    } catch (SoapFault $ex) {
        echo $ex->faultstring;
    }
}
開發者ID:jafarkhani,項目名稱:rtfund,代碼行數:31,代碼來源:sms.php

示例2: GetCredit

 public function GetCredit()
 {
     try {
         $client = new SoapClient($this->wsdl_link);
         return $client->GetCredit(array("username" => $this->username, "password" => $this->password))->GetCreditResult;
     } catch (SoapFault $ex) {
         return $ex->faultstring;
     }
 }
開發者ID:ajaycorbus,項目名稱:Plugins,代碼行數:9,代碼來源:smsmart.class.php

示例3: GetCredit

 public function GetCredit()
 {
     if (!$this->username and !$this->password) {
         return false;
     }
     $client = new SoapClient($this->wsdl_link);
     $result = $client->GetCredit($this->username, $this->password);
     return $this->_xml_extract("messages", $result);
 }
開發者ID:ajaycorbus,項目名稱:Plugins,代碼行數:9,代碼來源:labsmobile.class.php

示例4: GetCredit

 public function GetCredit()
 {
     if (!$this->username and !$this->password) {
         return;
     }
     $client = new SoapClient($this->wsdl_link);
     $result = $client->GetCredit(array('userName' => $this->username, 'password' => $this->password));
     return $result->GetCreditResult;
 }
開發者ID:jekv,項目名稱:devia,代碼行數:9,代碼來源:niazpardazcom.class.php

示例5: GetCredit

 public function GetCredit()
 {
     try {
         $client = new SoapClient($this->wsdl_link_credit);
         $parameters = array('signature' => $this->username);
         $responseSTD = (array) $client->GetCredit($parameters);
         return $responseSTD['GetCreditResult'];
     } catch (SoapFault $ex) {
         echo $ex->faultstring;
     }
 }
開發者ID:veronalabs,項目名稱:wp-sms,代碼行數:11,代碼來源:parsgreen.class.php

示例6: GetCredit

 public function GetCredit()
 {
     $client = new SoapClient($this->wsdl_link);
     $result = $client->GetCredit(array('AcountID' => $this->password));
     return $result->GetCreditResult;
 }
開發者ID:jekv,項目名稱:devia,代碼行數:6,代碼來源:imencms.class.php

示例7: GetCredit

 public function GetCredit()
 {
     $client = new SoapClient($this->wsdl_link);
     if ($client->Authentication($this->username, $this->password) == '1') {
         return $client->GetCredit();
     } else {
         return false;
     }
 }
開發者ID:ajaycorbus,項目名稱:Plugins,代碼行數:9,代碼來源:iransmspanel.class.php


注:本文中的SoapClient::GetCredit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。