本文整理汇总了PHP中SoapClient::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::logout方法的具体用法?PHP SoapClient::logout怎么用?PHP SoapClient::logout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::logout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logout
/**
* Logs out the current user.
*
*/
public function logout()
{
// no user logged in
if ($this->sessionId === null) {
return;
}
$this->server->logout($this->sessionId);
}
示例2: logout
/**
* logout in ovh.
*/
protected function logout()
{
if ($this->soapClient && $this->session) {
$this->soapClient->logout($this->session);
$this->session = null;
}
}
示例3: Create
function Create($operate_array, $create_array, $client_options_array)
{
$soap_location = "http://" . $operate_array['ip'] . ":" . $operate_array['port'] . "/remote/index.php";
$soap_uri = "http://" . $operate_array['ip'] . ":" . $operate_array['port'] . "/remote/";
$client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri));
if ($session_id = $client->login($username, $password)) {
$arr = $client_options_array;
$arr['contact_name'] = $create_array['clientlogin'];
$arr['username'] = $create_array['clientlogin'];
$arr['password'] = $create_array['clientpassword'];
if ($client->client_add($session_id, false, $arr)) {
if ($client->logout($session_id)) {
return true;
} else {
return false;
}
} else {
return false;
}
/*
$arr['limit_maildomain'] =
$arr['limit_mailbox'] =
$arr['limit_mailalias'] =
$arr['limit_mailaliasdomain'] =
$arr['limit_mailforward'] =
$arr['limit_mailcatchall'] =
$arr['limit_mailrouting'] =
$arr['limit_mailfilter'] =
$arr['limit_fetchmail'] =
$arr['limit_mailquota'] =
$arr['limit_spamfilter_wblist'] =
$arr['limit_spamfilter_user'] =
$arr['limit_spamfilter_policy'] =
$arr['limit_web_domain'] =
$arr['limit_web_quota'] =
$arr['web_php_options'] =
$arr['limit_web_aliasdomain'] =
$arr['limit_web_subdomain'] =
$arr['limit_ftp_user'] =
$arr['limit_shell_user'] =
$arr['ssh_chroot'] =
$arr['limit_webdav_user'] =
$arr['limit_dns_zone'] =
$arr['limit_dns_slave_zone'] =
$arr['limit_dns_record'] =
$arr['limit_client'] =
$arr['limit_database'] =
$arr['limit_cron'] =
$arr['limit_cron_type'] =
$arr['limit_cron_frequency'] =
$arr['limit_traffic_quota'] =
*/
} else {
return false;
}
}
示例4: FTPinfos_serverTotalSpace
public function FTPinfos_serverTotalSpace($localhost_path, $manager_loggin, $manager_pass)
{
if ($_SERVER['SERVER_ADDR'] == '127.0.0.1') {
return disk_total_space($localhost_path);
} else {
$soap = new \SoapClient("https://www.ovh.com/soapi/soapi-re-1.24.wsdl");
$session_soap = $soap->login($manager_loggin, $manager_pass, "fr", false);
$result = $soap->hostingSummary($session_soap, preg_replace('/^www\\./', '', $_SERVER["SERVER_NAME"]));
$soap->logout($session_soap);
return intval($result->maxWebspace) / 1000 * 1024 * 1024 * 1024;
}
}
示例5: loadData
protected function loadData()
{
$client = new SoapClient(null, array('location' => SOAP_LOCATION, 'uri' => SOAP_URI));
try {
//* Login to the remote server
if ($session_id = $client->login(SOAP_USER, SOAP_PASS)) {
$mail_user = $client->mail_user_get($session_id, array('email' => $this->email));
if (count($mail_user) == 1) {
$this->host = $client->server_get($session_id, $mail_user[0]['server_id'], 'server');
$this->user = $mail_user[0];
} else {
throw new Exception("Unknown Account");
}
}
//* Logout
$client->logout($session_id);
} catch (SoapFault $e) {
throw new Exception('SOAP Error: ' . $e->getMessage());
}
}
示例6: _changePassword
/**
*/
protected function _changePassword($user, $oldpass, $newpass)
{
// Connect
$soap_uri = $this->_params['soap_uri'];
$client = new SoapClient(null, array('location' => $soap_uri . 'index.php', 'uri' => $soap_uri));
// Login
try {
if (!($session_id = $client->login($this->_params['soap_user'], $this->_params['soap_pass']))) {
throw new Passwd_Exception(sprintf(_("Login to %s failed."), $soap_uri));
}
} catch (SoapFault $e) {
throw new Passwd_Exception($e);
}
// Get user information
try {
$users = $client->mail_user_get($session_id, array('login' => $user));
} catch (SoapFault $e) {
throw new Passwd_Exception($e);
}
if (count($users) != 1) {
throw new Passwd_Exception(sprintf(_("%d users with login %s found, one expected."), count($users), $user));
}
$user = $users[0];
// Check the passwords match
$this->_comparePasswords($user['password'], $oldpass);
// Set new password
$user['password'] = $newpass;
// Save information
try {
$client->mail_user_update($session_id, $user['client_id'], $user['mailuser_id'], $user);
} catch (SoapFault $e) {
throw new Passwd_Exception($e);
}
// Logout
try {
$client->logout($session_id);
} catch (SoapFault $e) {
throw new Passwd_Exception($e);
}
}
示例7: delete
/**
* @name delete($pMail)
* @param String
* @return VR
* @desc Supprime un mail de la mailing liste
*/
public function delete($pMail)
{
$lMailingListeValid = new MailingListeValid();
$lVr = $lMailingListeValid->validAjout($pMail);
if ($lVr->getValid()) {
// Initialisation du Logger
$lLogger =& Log::singleton('file', CHEMIN_FICHIER_LOGS);
$lLogger->setMask(Log::MAX(LOG_LEVEL));
try {
$lSoap = new SoapClient(ADRESSE_WSDL);
$lSession = $lSoap->login(SOAP_LOGIN, SOAP_PASS, "fr", false);
$lSoap->mailingListSubscriberDel($lSession, MAIL_MAILING_LISTE_DOMAIN, MAIL_MAILING_LISTE, $pMail);
$lSoap->logout($lSession);
return true;
} catch (SoapFault $pFault) {
$lLogger->log("Echec de suppression de la mailing liste : " . $pFault . ".", PEAR_LOG_INFO);
// Maj des logs
return false;
}
}
return $lVr;
}
示例8: SoapClient
$host_login = $host . '/soap/?wsdl';
$host_tracker = $host . '/plugins/tracker/soap/?wsdl';
// Establish connection to the server
$client_login = new SoapClient($host_login, $soap_options);
$session_hash = $client_login->login($login, $password)->session_hash;
try {
// Connecting to the soap's tracker api
$client_tracker = new SoapClient($host_tracker, $soap_options);
$response = $client_tracker->getArtifactsFromReport($session_hash, $report_id, $offset, $limit);
var_dump($response);
echo "total_artifacts_number: " . $response->total_artifacts_number . "\n";
foreach ($response->artifacts as $artifact) {
$message = "#" . $artifact->artifact_id;
foreach ($artifact->value as $value) {
if ((string) $value->field_name == "description") {
$message .= " " . (string) $value->field_value;
}
if ((string) $value->field_name == "remaining_effort" && (string) $value->field_value) {
$message .= " (" . (string) $value->field_label . ": " . (string) $value->field_value . ")";
}
}
echo $message . "\n";
}
} catch (Exception $e) {
echo $e->getMessage();
echo "\n";
echo $client_tracker->__getLastResponse();
echo "\n";
}
$client_login->logout($session_hash);
示例9: catch
$errors[] = "Error : " . $fault;
}
//popModifyPassword
try {
$result = $soap->popModifyPassword($session, $domain, $email_name, $newpass, false);
$success .= "popModifyPassword successfull<br/>";
$success .= print_r($result);
$success .= "<br/>";
$success .= "<h3>Merci.<br />Mot de passe modifié.</h3>";
$success .= "<h3>Il sera pris en compte d'ici une quinzaine de minutes</h3>";
} catch (SoapFault $fault) {
$errors[] = "Error : " . $fault;
}
//logout
try {
$result = $soap->logout($session);
$success .= "logout successfull<br/>";
} catch (SoapFault $fault) {
$errors[] = "Error : " . $fault;
}
} elseif (strlen($newpass) > 0 && $newpass != $newpass2) {
// ici le cas ou le premier nouveau mot de passe ne correspond pas au second
$errors[] = "The two passwords are not equal, please check it";
} elseif (strlen($newpass) > 0 && strlen($newpass) < 8) {
// Si le mot de passe fait moins de 8 caractères on refuse
$errors[] = "Make sure your password has minimum 8 characters.";
}
}
$error_text = '';
if (!empty($errors)) {
$error_text .= '<ul class="error-list">';
示例10: elseif
echo "Finish: transaction has been processed\n";
echo "Tr. ID: " . $response3->tr_id . "\n";
} else {
echo "Settlement error: " . $response3->status . " i " . $response3->msg . "\n";
}
} else {
echo "ConfirmTransaction error: " . $response2->status . " i " . $response2->msg . "\n";
}
} elseif ($response->status == 'OK') {
echo "Step 2b: Transaction has been accepted, no confirmation required, it can be processed\n";
$request_id = $response->request_id;
$response2 = $soap->Settlement($request_id);
if ($response2->status == 'OK') {
echo "Finish: transaction has been processed\n";
echo "Tr. ID: " . $response2->tr_id . "\n";
} else {
echo "Settlement error: " . $response2->status . " i " . $response2->msg . "\n";
}
} else {
echo "PreAuth error: " . $response->status . " i " . $response->msg . "\n";
}
$soap->logout();
echo "Logout\n";
} else {
echo "Auth error: " . $response->status . " " . $response->msg . "\n";
}
} catch (Exception $e) {
var_export($e);
}
?>
</pre>
示例11: SoapClient
<?php
if (!isset($_POST['lines'], $_POST['user'], $_POST['password'])) {
echo 'Aucune donnée envoyée !';
exit;
}
try {
$soap = new SoapClient("https://www.ovh.com/soapi/soapi-re-1.63.wsdl");
//login
$session = $soap->login("", "", "fr", false);
foreach (preg_split("/,[\\s]?/", $_POST['lines']) as $line) {
$soap->telephonyClick2CallUserAdd($session, $line, "", $_POST['user'], $_POST['password']);
}
$soap->logout($session);
} catch (SoapFault $fault) {
echo $fault->getMessage();
}
示例12: ispcfg3_ChangePassword
function ispcfg3_ChangePassword($params)
{
$username = $params['username'];
$password = $params['password'];
$clientsdetails = $params['clientsdetails'];
$soapuser = $params['configoption1'];
$soappassword = $params['configoption2'];
$soapsvrurl = $params['configoption3'];
$soapsvrssl = $params['configoption4'];
if ($soapsvrssl == 'on') {
$soap_url = 'https://' . $soapsvrurl . '/remote/index.php';
$soap_uri = 'https://' . $soapsvrurl . '/remote/';
} else {
$soap_url = 'http://' . $soapsvrurl . '/remote/index.php';
$soap_uri = 'http://' . $soapsvrurl . '/remote/';
}
if (isset($username) && $username != '' && (isset($password) && $password != '')) {
try {
/* Connect to SOAP Server */
$client = new SoapClient(null, array('location' => $soap_url, 'uri' => $soap_uri, 'exceptions' => 1, 'trace' => false));
/* Authenticate with the SOAP Server */
$session_id = $client->login($soapuser, $soappassword);
$domain_id = $client->client_get_by_username($session_id, $username);
$client_id = $domain_id['client_id'];
$returnresult = $client->client_change_password($session_id, $client_id, $password);
logModuleCall('ispconfig', 'ChangePassword', $clientsdetails, $returnresult, '', '');
if ($client->logout($session_id)) {
}
if ($returnresult == 1) {
$successful = '1';
} else {
$successful = '0';
$result = "Password change failed";
}
} catch (SoapFault $e) {
$error = 'SOAP Error: ' . $e->getMessage();
$successful = '0';
}
if ($successful == 1) {
$result = 'success';
} else {
$result = 'Error: ' . $error;
}
} else {
/*
* No username or password set.
*/
$result = 'Username or Password is Blank or Not Set';
}
return $result;
}
示例13: SoapClient
<?php
$host = 'shunt.cro.enalean.com';
$soap_client = new SoapClient("http://{$host}/soap/codendi.wsdl.php?wsdl");
$session_hash = $soap_client->login('nicolas', 'nicolas')->session_hash;
$svn_client = new SoapClient("http://{$host}/soap/svn/?wsdl", array('cache_wsdl' => WSDL_CACHE_NONE));
$start_date = mktime(0, 0, 0, 3, 1, 2012);
$end_date = mktime(0, 0, 0, 5, 1, 2012);
echo "=== Top used files ===\n";
var_dump($svn_client->getSvnStatsFiles($session_hash, 101, $start_date, $end_date, 10));
echo "=== Commiters ===\n";
var_dump($svn_client->getSvnStatsUsers($session_hash, 101, $start_date, $end_date));
$soap_client->logout($session_hash);
示例14: save
function save()
{
$confirm = $this->rcmail_inst->config->get('password_confirm_current');
if ($confirm && !isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
$this->rcmail_inst->output->command('display_message', $this->gettext('nopassword'), 'error');
} else {
$curpwd = rcube_utils::get_input_value('_curpasswd', RCUBE_INPUT_POST);
$newpwd = rcube_utils::get_input_value('_newpasswd', RCUBE_INPUT_POST);
$pwl = $this->rcmail_inst->config->get('password_min_length');
$checkUpper = $this->rcmail_inst->config->get('password_check_upper');
$checkLower = $this->rcmail_inst->config->get('password_check_lower');
$checkSymbol = $this->rcmail_inst->config->get('password_check_symbol');
$checkNumber = $this->rcmail_inst->config->get('password_check_number');
$error = false;
if (!empty($pwl)) {
$pwl = max(6, $pwl);
} else {
$pwl = 6;
}
if ($confirm && $this->rcmail_inst->decrypt($_SESSION['password']) != $curpwd) {
$this->rcmail_inst->output->command('display_message', $this->gettext('passwordincorrect'), 'error');
} else {
if (strlen($newpwd) < $pwl) {
$error = true;
$this->rcmail_inst->output->command('display_message', str_replace("%d", $pwl, $this->gettext('passwordminlength')), 'error');
}
if (!$error && $checkNumber && !preg_match("#[0-9]+#", $newpwd)) {
$error = true;
$this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecknumber'), 'error');
}
if (!$error && $checkLower && !preg_match("#[a-z]+#", $newpwd)) {
$error = true;
$this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecklower'), 'error');
}
if (!$error && $checkUpper && !preg_match("#[A-Z]+#", $newpwd)) {
$error = true;
$this->rcmail_inst->output->command('display_message', $this->gettext('passwordcheckupper'), 'error');
}
if (!$error && $checkSymbol && !preg_match("#\\W+#", $newpwd)) {
$error = true;
$this->rcmail_inst->output->command('display_message', $this->gettext('passwordchecksymbol'), 'error');
}
if (!$error) {
try {
$soap = new SoapClient(null, array('location' => $this->rcmail_inst->config->get('soap_url') . 'index.php', 'uri' => $this->rcmail_inst->config->get('soap_url')));
$session_id = $soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
$mail_user = $soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
$params = $mail_user[0];
$startdate = array('year' => substr($params['autoresponder_start_date'], 0, 4), 'month' => substr($params['autoresponder_start_date'], 5, 2), 'day' => substr($params['autoresponder_start_date'], 8, 2), 'hour' => substr($params['autoresponder_start_date'], 11, 2), 'minute' => substr($params['autoresponder_start_date'], 14, 2));
$enddate = array('year' => substr($params['autoresponder_end_date'], 0, 4), 'month' => substr($params['autoresponder_end_date'], 5, 2), 'day' => substr($params['autoresponder_end_date'], 8, 2), 'hour' => substr($params['autoresponder_end_date'], 11, 2), 'minute' => substr($params['autoresponder_end_date'], 14, 2));
$params['password'] = $newpwd;
$params['autoresponder_end_date'] = $enddate;
$params['autoresponder_start_date'] = $startdate;
$uid = $soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
$update = $soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
$soap->logout($session_id);
$this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
$_SESSION['password'] = $this->rcmail_inst->encrypt($newpwd);
$this->rcmail_inst->user->data['password'] = $_SESSION['password'];
} catch (SoapFault $e) {
$this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
}
}
}
}
$this->init_html();
}
示例15: ovh_GetEPPCode
function ovh_GetEPPCode($params)
{
ini_set("display_errors", "off");
error_reporting(0);
try {
$url = "https://www.ovh.com/soapi/soapi-re-1.14.wsdl";
$soap = new SoapClient($url, array("trace" => 1));
$username = $params['Username'];
$password = $params['Password'];
$testmode = $params['TestMode'] ? true : false;
$session = $soap->login("" . $username, "" . $password, "en", false);
$tld = $params['tld'];
$sld = $params['sld'];
$domain = "" . $sld . "." . $tld;
$information = $soap->domainInfo($session, "" . $domain);
$values['eppcode'] = $information->authinfo;
} catch (Exception $e) {
logModuleCall("ovh", "Get EPP Code", $soap->__getLastRequest(), $e . $url, null, $session);
if ($e->faultstring) {
return array("error" => $e->faultstring);
}
return array("error" => "An unhandled error occurred");
}
$soap->logout($session);
return $values;
}