Пример #1
0
        private String getCaptcha()
        {
            GeetestLib geetest = new GeetestLib();

            geetest.CaptchaID  = GeetestConfig.publicKey;
            geetest.PrivateKey = GeetestConfig.privateKey;
            geetest.setGtSession(Session);
            String resStr = "";

            if (geetest.preProcess())
            {
                resStr = geetest.getSuccessPreProcessRes();
                geetest.setGtServerStatusSession(Session, 1);
            }
            else
            {
                resStr = geetest.getFailPreProcessRes();
                geetest.setGtServerStatusSession(Session, 0);
            }
            return(resStr);
        }