-
Notifications
You must be signed in to change notification settings - Fork 0
/
parsig_sms_class.php
executable file
·49 lines (34 loc) · 1.46 KB
/
parsig_sms_class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
class SMS_Handler{
private $config = array();
private $SMS = null;
public function __construct($config){
include 'nus/nusoap.php';
$this->SMS = new nusoap_client('http://sbox.ir/webservice/?wsdl', 'wsdl');
$this->config = $config;
}
function OneSend($number = null, $msg = null){
$config = $this->config;
$config['to'] = $number;
$config['message'] = $msg;
return $this->SMS->call('send', $config);
}
function MultiSend($number = array(), $msg = array()){
$config = $this->config;
$config['to'] = $number;
$config['message'] = $msg;
return $this->SMS->call('multiSend', $config);
}
function AccountInfo(){
$config = $this->config;
unset($config['from']);
return $this->SMS->call('accountInfo', $config);
}
function FetchMessages($time = null, $new = true){
$config = $this->config;
unset($config['from']);
if(!empty($time)) $config['time'] = $time;
$config['new'] = $new;
return $this->SMS->call('getMessages', $config);
}
}