当前位置: 首页>>代码示例>>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;未经允许,请勿转载。