/** * Pobiera dane wyslanych SMS o ID zebranych w $this->_smsIds * * @return mixed */ public function getSmsInfoMany() { if (empty($this->_smsIds)) { throw new Exception('Nie zarejestrowano identyfikatora SMS', 3); } $response = array(); foreach ($this->_smsIds as $val) { $response[] = $this->_client->info($clientHash = $this->_config['clientHash'], $serviceHash = $this->_config['serviceHash'], $smsId = $val); } return $response; }
<?php include_once '../config/default.php'; $options = $soap; $options['location'] = 'http://webservice.example.com/soaplog'; $client = new SoapClient(null, $options); try { print_r($client->info('Helloworld')); print_r($client->debug('Linux')); print_r($client->warning('hello')); print_r($client->error('os')); } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; }
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php $client = new SoapClient("http://localhost/moodle/agap.wsdl"); $var = 4; $res1 = $client->info(new SoapParam($var, "StudentNumber")); print $res1 . "<br/>\n"; $var = 'qdelamot'; $var2 = 'mot de passe'; $res2 = $client->notes(new SoapParam($var, "StudentLogin"), new SoapParam($var2, "StudentPassword")); print $res2 . "<br/>\n"; ?> </body> </html>