@@ 30-41 (lines=12) @@ | ||
27 | $this->sendContentSms($to, $content); |
|
28 | } |
|
29 | ||
30 | public function sendContentSms($to, $content) |
|
31 | { |
|
32 | $url = 'http://api.smsbao.com/sms'; |
|
33 | $params = [ |
|
34 | 'u' => $this->username, |
|
35 | 'p' => md5($this->password), |
|
36 | 'm' => $to, |
|
37 | 'c' => $content, |
|
38 | ]; |
|
39 | $result = $this->curl($url, $params); |
|
40 | $this->setResult($result); |
|
41 | } |
|
42 | ||
43 | public function voiceVerify($to, $code, $tempId, array $tempData) |
|
44 | { |
|
@@ 43-54 (lines=12) @@ | ||
40 | $this->setResult($result); |
|
41 | } |
|
42 | ||
43 | public function voiceVerify($to, $code, $tempId, array $tempData) |
|
44 | { |
|
45 | $url = 'http://api.smsbao.com/voice'; |
|
46 | $params = [ |
|
47 | 'u' => $this->username, |
|
48 | 'p' => md5($this->password), |
|
49 | 'm' => $to, |
|
50 | 'c' => $code, |
|
51 | ]; |
|
52 | $result = $this->curl($url, $params); |
|
53 | $this->setResult($result); |
|
54 | } |
|
55 | ||
56 | protected function setResult($result) |
|
57 | { |