<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Sms\Service; use ModStart\Core\Input\Response; class JuheSmsService { private $key; public function __construct($bM44E) { $this->key = $bM44E; } public function send($fFmiT, $Dz2QQ, $OzAEo = array()) { goto ne4Mx; ma1l9: $YM_4w['tpl_value'] = join('&', $cY2Z1); goto YO1ZX; Gfs43: $YM_4w['tpl_id'] = $Dz2QQ; goto Dh2VF; trC4r: return Response::generate(0, null, $yvBIN); goto B6E70; ne4Mx: $YM_4w = array(); goto WlBwY; S4JSi: $cY2Z1 = array(); goto C8vdr; C8vdr: foreach ($OzAEo as $l0ek5 => $vuqB0) { $cY2Z1[] = '#' . urlencode($l0ek5) . '#=' . urlencode($vuqB0); } goto ma1l9; GsqmK: if (empty($yvBIN) || !isset($yvBIN['error_code'])) { return Response::generate(-1, '发送发生错误', $yvBIN); } goto IpLs3; Dh2VF: $YM_4w['mobile'] = $fFmiT; goto S4JSi; WlBwY: $YM_4w['key'] = $this->key; goto Gfs43; IpLs3: if ($yvBIN['error_code']) { goto E72p8; E72p8: $A8CCq = $yvBIN['reason']; goto h5BeU; Yqq02: return Response::generate(-1, $A8CCq, $yvBIN); goto m0feH; h5BeU: unset($yvBIN['reason']); goto Yqq02; m0feH: } goto trC4r; RhpLB: $yvBIN = @json_decode($yvBIN, true); goto GsqmK; YO1ZX: $yvBIN = $this->get('http://v.juhe.cn/sms/send', $YM_4w); goto RhpLB; B6E70: } private function get($C1E2v, $OzAEo = array()) { goto NqrCg; eNgvb: curl_setopt($zMNki, CURLOPT_RETURNTRANSFER, true); goto Exxwy; QUNcw: curl_setopt($zMNki, CURLOPT_HEADER, false); goto eNgvb; Zl2Od: curl_close($zMNki); goto hhZja; I8AdK: $zMNki = curl_init($C1E2v); goto QUNcw; DUOjy: if (strpos($C1E2v, '?') !== false) { $hniC9 = '&'; } goto B73p5; NqrCg: $hniC9 = '?'; goto DUOjy; B73p5: $C1E2v .= $hniC9 . http_build_query($OzAEo); goto I8AdK; hhZja: return $dTlXv; goto Waf1o; Exxwy: curl_setopt($zMNki, CURLOPT_TIMEOUT, 30); goto vg_6_; vg_6_: $dTlXv = curl_exec($zMNki); goto Zl2Od; Waf1o: } }