| @@ 36-47 (lines=12) @@ | ||
| 33 | * @param $to |
|
| 34 | * @param $content |
|
| 35 | */ |
|
| 36 | public function sendContentSms($to, $content) |
|
| 37 | { |
|
| 38 | $url = 'http://api.smsbao.com/sms'; |
|
| 39 | $params = [ |
|
| 40 | 'u' => $this->username, |
|
| 41 | 'p' => md5($this->password), |
|
| 42 | 'm' => $to, |
|
| 43 | 'c' => $content, |
|
| 44 | ]; |
|
| 45 | $result = $this->curl($url, $params); |
|
| 46 | $this->setResult($result); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Template SMS send process. |
|
| @@ 68-79 (lines=12) @@ | ||
| 65 | * @param $tempId |
|
| 66 | * @param array $tempData |
|
| 67 | */ |
|
| 68 | public function voiceVerify($to, $code, $tempId, array $tempData) |
|
| 69 | { |
|
| 70 | $url = 'http://api.smsbao.com/voice'; |
|
| 71 | $params = [ |
|
| 72 | 'u' => $this->username, |
|
| 73 | 'p' => md5($this->password), |
|
| 74 | 'm' => $to, |
|
| 75 | 'c' => $code, |
|
| 76 | ]; |
|
| 77 | $result = $this->curl($url, $params); |
|
| 78 | $this->setResult($result); |
|
| 79 | } |
|
| 80 | ||
| 81 | protected function setResult($result) |
|
| 82 | { |
|