本文整理汇总了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;
}
}
示例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;
}
}
示例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);
}
示例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;
}
示例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;
}
}
示例6: GetCredit
public function GetCredit()
{
$client = new SoapClient($this->wsdl_link);
$result = $client->GetCredit(array('AcountID' => $this->password));
return $result->GetCreditResult;
}
示例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;
}
}