@@ 25-36 (lines=12) @@ | ||
22 | '51' => '手机号码不正确', |
|
23 | ]; |
|
24 | ||
25 | public function sendContentSms($to, $content) |
|
26 | { |
|
27 | $url = 'http://api.smsbao.com/sms'; |
|
28 | $params = [ |
|
29 | 'u' => $this->username, |
|
30 | 'p' => md5($this->password), |
|
31 | 'm' => $to, |
|
32 | 'c' => $content, |
|
33 | ]; |
|
34 | $result = $this->curlGet($url, $params); |
|
35 | $this->setResult($result); |
|
36 | } |
|
37 | ||
38 | public function sendVoiceCode($to, $code) |
|
39 | { |
|
@@ 38-49 (lines=12) @@ | ||
35 | $this->setResult($result); |
|
36 | } |
|
37 | ||
38 | public function sendVoiceCode($to, $code) |
|
39 | { |
|
40 | $url = 'http://api.smsbao.com/voice'; |
|
41 | $params = [ |
|
42 | 'u' => $this->username, |
|
43 | 'p' => md5($this->password), |
|
44 | 'm' => $to, |
|
45 | 'c' => $code, |
|
46 | ]; |
|
47 | $result = $this->curlGet($url, $params); |
|
48 | $this->setResult($result); |
|
49 | } |
|
50 | ||
51 | protected function setResult($result) |
|
52 | { |