@@ 17-25 (lines=9) @@ | ||
14 | $this->sendContentSms($to, $content); |
|
15 | } |
|
16 | ||
17 | public function sendContentSms($to, $content) |
|
18 | { |
|
19 | $url = 'http://yunpian.com/v1/sms/send.json'; |
|
20 | $apikey = $this->apikey; |
|
21 | $content = urlencode("$content"); |
|
22 | $postString = "apikey=$apikey&text=$content&mobile=$to"; |
|
23 | $response = $this->sockPost($url, $postString); |
|
24 | $this->setResult($response); |
|
25 | } |
|
26 | ||
27 | public function voiceVerify($to, $code, $tempId, array $data) |
|
28 | { |
|
@@ 27-34 (lines=8) @@ | ||
24 | $this->setResult($response); |
|
25 | } |
|
26 | ||
27 | public function voiceVerify($to, $code, $tempId, array $data) |
|
28 | { |
|
29 | $url = 'http://voice.yunpian.com/v1/voice/send.json'; |
|
30 | $apikey = $this->apikey; |
|
31 | $postString = "apikey=$apikey&code=$code&mobile=$to"; |
|
32 | $response = $this->sockPost($url, $postString); |
|
33 | $this->setResult($response); |
|
34 | } |
|
35 | ||
36 | protected function setResult($result) |
|
37 | { |