static function send_mobile_code($mobile, $ttl = 600) { $vcode = substr(sprintf("%06d", mt_rand()), 0, 6); self::set_data('sms_' . $mobile, $vcode, $ttl); SMS::send_code($mobile, $vcode); return $vcode; }