public function Resetpwd($token, $pwd, $umobile, $captcha) { $proxy = "http://182.92.97.3:13128"; $api = 'https://webapi.sms.mob.com'; //(例:https://webapi.sms.mob.com); $appkey = 'f40f0f41f1d1'; //您的appkey $zone = '86'; $apiurl = $api . '/sms/verify'; $param = array('appkey' => $appkey, 'phone' => $umobile, 'zone' => $zone, 'code' => $captcha); $vrest = VerificationCode_proxy($apiurl, $proxy, $param); if (!$vrest) { $ret['ret'] = 1; $ret['msg'] = 'verify cathcha error!'; } else { $user = new UserService(); if ($user->resetPassword($umobile, $pwd)) { $ret['ret'] = 0; $ret['msg'] = ''; } else { $ret['ret'] = 7; $ret['msg'] = 'user not exist or reset user password failed!'; } } $ret_h = new \proto\RetHead($ret); return $ret_h; }