Exemple #1
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sServerID = GetServerID(sGameAbbre);
            string        sReturn   = string.Empty;
            string        key       = "dao50_334dfg437_56dvfdgh4";
            string        time      = ProvideCommon.getTime().ToString();
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(time);
            sbText.Append(key);
            string flag = ProvideCommon.MD5(sbText.ToString());; //md5(username + time + 密钥)
            string sUrl = string.Format("http://s{0}.txj.dao50.com/game/api/get_player_info.php?username={1}&time={2}&flag={3}", sServerID, sUserID, time, flag);
            string sRes = ProvideCommon.GetPageInfo(sUrl);

            switch (sRes)
            {
            case "2":
                sReturn = "1";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Exemple #2
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        spid     = "dao50";//平台id
            string        gameid   = "4";
            string        serverid = GetServerID(sGame);
            string        key      = "qrEyrtZc9aBW0z5i";
            int           iMoney   = Convert.ToInt32(dMoney * 100);//单位:分
            string        user_ip  = ProvideCommon.GetRealIP();
            string        ctime    = ProvideCommon.getTime().ToString();
            string        orderid  = sOrderID.Substring(0, 32);
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", spid);
            sbText.AppendFormat("{0}|", gameid);
            sbText.AppendFormat("{0}|", serverid);
            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", orderid);
            sbText.AppendFormat("{0}|", iMoney.ToString());
            sbText.AppendFormat("{0}|", user_ip);
            sbText.AppendFormat("{0}|", ctime);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//md5(spid|gameid|serverid|userid|orderid|money|userip|ctime|key)
            string sUrl = string.Format("http://mid.gamefy.cn/union_mid/charge?userid={0}&spid={1}&gameid={2}&serverid={3}&orderid={4}&money={5}&userip={6}&ctime={7}&sign={8}",
                                        sUserID, spid, gameid, serverid, orderid, iMoney.ToString(), user_ip, ctime, sign);
            string sRes    = ProvideCommon.GetPageInfo(sUrl.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #3
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string sReturn = string.Empty;
            string op_id   = "115";
            string sid     = GetServerID(sGameAbbre);
            string account = sUserID;
            string time    = ProvideCommon.getTime().ToString();
            string sAuth   = string.Format("op_id={0}&sid={1}&game_id=36&account={2}&time={3}",
                                           op_id, sid, account, time);
            string sBase64Auth = Base64.EncodeBase64(sAuth);
            string sVerify     = ProvideCommon.MD5(string.Format("{0}{1}", sBase64Auth, key));
            string sPayUrl     = string.Format("http://up.uuzu.com/api/commonAPI/roleverify?auth={0}&verify={1}", sBase64Auth, sVerify);
            string sRes        = ProvideCommon.GetPageInfo(sPayUrl);

            try
            {
                JSONObject json  = JSONConvert.DeserializeObject(sRes);
                string     sCode = json["status"].ToString();
                switch (sCode)
                {
                case "8":
                    sReturn = "1";
                    break;

                default:
                    sReturn = sRes;
                    break;
                }
            }
            finally
            {
                JSONConvert.clearJson();
            }
            return(sReturn);
        }
Exemple #4
0
        public static string GetNewCode(string sUserID, string sGameAbbre, string sCodeType)
        {
            string        spid       = "lin";
            string        time       = ProvideCommon.getTime().ToString();
            string        server_num = GetServerID(sGameAbbre);
            string        key        = "5c22fb494ba87294287fe5e743a7fe07";
            StringBuilder sbText     = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", spid);
            sbText.AppendFormat("{0}", server_num);
            sbText.AppendFormat("{0}", sCodeType);//0:新手卡 1:手机绑定卡
            sbText.AppendFormat("{0}", time);
            sbText.AppendFormat("{0}", key);
            string sSign = ProvideCommon.MD5(sbText.ToString());//($user.$spid.$server_num.$type.$time.KEY)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.ahxx.dao50.com/getcard.php?", server_num);
            sbText.AppendFormat("spid={0}", spid);
            sbText.AppendFormat("&user={0}", sUserID);
            sbText.AppendFormat("&server_num={0}", server_num);
            sbText.AppendFormat("&type={0}", sCodeType);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&sign={0}", sSign);

            string sRes = ProvideCommon.GetPageInfo(sbText.ToString(), "UTF-8");

            return(sRes);
        }
Exemple #5
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        paytime  = ProvideCommon.getTime().ToString();
            int           iMoney   = Convert.ToInt32(dMoney);
            int           gold     = iMoney * 10;
            string        serverid = GetServerID(sGame);
            string        key      = "308494a405f92ca02c74d562aed83ce3";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", paytime);
            sbText.AppendFormat("{0}|", gold.ToString());
            sbText.AppendFormat("{0}|", serverid);
            sbText.Append(key);

            string sSign = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$paytime|$gold|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = string.Format("http://s{0}.yjxy.dao50.com/intf/general/pay.php", serverid);

            sbText.AppendFormat("accname={0}&paytime={1}&gold={2}&billno={3}&serverid={4}&sign={5}",
                                sUserID, paytime, gold.ToString(), sOrderID, serverid, sSign);
            string sRes    = ProvideCommon.GetPageInfoByPost(sGamePayUrl, sbText.ToString(), "UTF-8");
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", sGamePayUrl, sbText.ToString());

            GamePayBLL.GamePayAdd(sTranIP, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #6
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sReturn       = string.Empty;
            string        agentName     = "dao50";
            string        TICKET_SEARCH = "dao50::TGZT::INFO::KEY::YSk99ZTjpXb2Nw";
            string        serverid      = GetServerID(sGameAbbre);
            string        stamp         = ProvideCommon.getTime().ToString();//标准时间戳
            StringBuilder sbText        = new StringBuilder();

            sbText.Append(TICKET_SEARCH);
            sbText.Append(sUserID);
            sbText.Append(agentName);
            sbText.Append(serverid);
            sbText.Append(stamp);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(SEARCH_KEY + accountName+ AgentName + serverID + stamp)

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://web.tgzt.mingchaoonline.com/api/v1/mc/getAccountInfo.php?");
            sbText.AppendFormat("accountName={0}&", sUserID);
            sbText.AppendFormat("agentName={0}&", agentName);
            sbText.AppendFormat("serverID={0}&", serverid);
            sbText.AppendFormat("stamp={0}&", stamp);
            sbText.AppendFormat("flag={0}", flag);
            string sRes = ProvideCommon.GetPageInfo(sbText.ToString());

            if (sRes == "-3")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #7
0
        public static string Login(string sUserID, string sGameName)
        {
            string        sLoginTime = ProvideCommon.getTime().ToString();
            string        sKey       = "long_dao50_gs_KEY_Ker9744JJelorerJEIrADw84er21WKREtKekw";
            StringBuilder sbText     = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(sLoginTime);
            sbText.Append(sKey);
            string sFlag = Common.ProvideCommon.MD5(sbText.ToString()).ToLower();//md5($username.$time.$key) 这里传递的md5字串为小写字母

            sbText.Remove(0, sbText.Length);
            sbText.Append(LoginGameUrl(sGameName));
            sbText.Append("?username="******"&time=");
            sbText.Append(sLoginTime);
            sbText.Append("&isAdult=1");
            sbText.Append("&flag=");
            sbText.Append(sFlag);
            sbText.Append("&agent=dao50");
            string sServer = ServerName(sGameName);

            sbText.AppendFormat("&server={0}", sServer);
            return(sbText.ToString());
        }
Exemple #8
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        server_id = GetServerID(sGameAbbre);//游戏各个分区的编号,一区为1,二区为2
            string        time      = ProvideCommon.getTime().ToString();
            string        sKey      = "daaa5376-b6bb-11e2-87ff-842b2b627011";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}|{1}|{2}|{3}", sUserID, server_id, time, sKey);

            string sign = ProvideCommon.MD5(sbText.ToString());//md5( $uid . '|' . $server_id . '|' . $time . '|' . $key )

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://user.by.dao50.com/auth/dao50/check.php?uid={0}&server_id={1}&time={2}&sign={3}", sUserID, server_id, time, sign);
            string sUrl    = sbText.ToString();
            string sRes    = ProvideCommon.GetPageInfo(sUrl);
            string sReturn = string.Empty;

            if (sRes == "0")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #9
0
        public static string GetNewCode(string sGame, string sUserID)
        {
            string        sid     = GetServerID(sGame);//服务器编号
            string        account = sUserID;
            string        time    = ProvideCommon.getTime().ToString();
            StringBuilder sbText  = new StringBuilder();

            sbText.AppendFormat("tid={0}&", tid);
            sbText.AppendFormat("sid={0}&", sid);
            sbText.AppendFormat("account={0}&", account);
            sbText.AppendFormat("time={0}&", time);
            string     auth    = Base64.EncodeBase64(sbText.ToString());
            string     verify  = ProvideCommon.MD5(string.Format("{0}{1}", auth, key));
            string     sUrl    = string.Format("http://up.9787.com/api/1/uinterface.php?action=getNewCard&auth={0}&verify={1}", auth, verify);
            string     sRes    = ProvideCommon.GetPageInfo(sUrl);
            string     sResult = string.Empty;
            JSONObject json    = JSONConvert.DeserializeObject(sRes);
            string     status  = json["status"].ToString();

            if (status == "-1" || status == "1")
            {
                sResult = json["card"].ToString();
            }
            else
            {
                sResult = status;
            }
            JSONConvert.clearJson();
            return(sResult);
        }
Exemple #10
0
        public static string Login(string sUserID, string sGame, string sClient)
        {
            string        serverid  = GetServerID(sGame);
            string        timestamp = ProvideCommon.getTime().ToString();
            string        ptid      = "dao50";
            string        isAdult   = "1";
            string        key       = "D50*^%SDAFewERYp754333o*#$pe353JYQZ2*&$#@LOGIN";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", serverid);
            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", timestamp);
            sbText.AppendFormat("{0}", isAdult);
            sbText.AppendFormat("{0}", key);
            sbText.AppendFormat("{0}", ptid);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//MD5(coopname=&serverid=&userid=&key=&timestamp=)

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://res.mhtj.8641.com/TJMain.htm?");

            sbText.AppendFormat("ptid={0}", ptid);
            sbText.AppendFormat("&sid={0}", serverid);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&time={0}", timestamp);
            sbText.AppendFormat("&isAdult={0}", isAdult);
            sbText.AppendFormat("&flag={0}", sign);
            return(sbText.ToString());
        }
Exemple #11
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string key       = "76ju^j*3Hi2";
            string sReturn   = string.Empty;
            string server_id = GetServerID(sGameAbbre);
            string time      = ProvideCommon.getTime().ToString();
            string agentid   = "29";
            string sign      = ProvideCommon.MD5(key + time + sUserID);
            string sQueryUrl = string.Format("http://domestic.naruto.gametrees.com/api/dao50/info.player.php?user_name={0}&agentid={1}&serverid={2}&t={3}&s={4} ", sUserID, agentid, server_id, time, sign);
            string sRes      = ProvideCommon.GetPageInfo(sQueryUrl);

            try
            {
                JSONObject json  = JSONConvert.DeserializeObject(sRes);
                string     sCode = json["error_code"].ToString();
                if (sCode != "0")
                {
                    sReturn = "1";
                }
                else
                {
                    sReturn = sCode;
                }
            }
            finally
            {
                JSONConvert.clearJson();
            }
            return(sReturn);
        }
Exemple #12
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame, string playerId)
        {
            string        yx        = "dao50";//运营商标识
            string        userid    = sUserID;
            string        sTranTime = TransGBLL.TransTimeSelByTID(sOrderID);
            string        orderId   = ProvideCommon.getTime(DateTime.Parse(sTranTime)).ToString();
            int           iGold     = Convert.ToInt32(dMoney * 10);
            string        gold      = iGold.ToString();
            string        tp        = ProvideCommon.getTime().ToString();
            string        payKey    = "##$~@@(dao50::PAY)@@RMd3YAtihg5GhO6LsU";
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(yx);
            sbText.Append(userid);
            sbText.Append(orderId);
            sbText.Append(gold);
            sbText.Append(tp);
            sbText.Append(payKey);
            string ticket      = ProvideCommon.MD5(sbText.ToString());//yx+userId+orderId+gold+tp+payKey
            string sGamePayUrl = string.Format("http://{0}/yx/pay?yx={1}&userId={2}&playerId={3}&orderId={4}&gold={5}&tp={6}&ticket={7}",
                                               ServerHost(sGame), yx, userid, playerId, orderId, gold, tp, ticket);
            string sRes    = ProvideCommon.GetPageInfo(sGamePayUrl);
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sGamePayUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #13
0
        public static string Login(string sUserID, string sGame)
        {
            string        yx       = "dao50";//运营商标识
            string        userid   = sUserID;
            string        tp       = ProvideCommon.getTime().ToString();
            string        key      = sUserID;
            string        loginKey = "#!$$@@(dao50::LOGIN)@@annzrFtNKgRwih2x";
            StringBuilder sbText   = new StringBuilder();

            //预登陆
            sbText.Append(yx);
            sbText.Append(userid);
            sbText.Append(tp);
            sbText.Append(loginKey);
            string preloginticket = ProvideCommon.MD5(sbText.ToString());//yx+userId+tp+loginKey
            string preUrl         = string.Format("http://{0}/yx/preLogin?yx={1}&userId={2}&tp={3}&key={4}&ticket={5}", ServerHost(sGame), yx, userid, tp, key, preloginticket);

            ProvideCommon.GetPageInfo(preUrl);

            sbText.Remove(0, sbText.Length);
            sbText.Append(yx);
            sbText.Append(userid);
            sbText.Append(tp);
            sbText.Append(key);
            sbText.Append(loginKey);
            string loginticket = ProvideCommon.MD5(sbText.ToString());//yx+userId+sfid+tp+key+loginKey
            string Url         = string.Format("http://{0}/yx/login?yx={1}&userId={2}&userName={2}&tp={3}&sfid=&adult=1&yxSource=&ticket={4}",
                                               ServerHost(sGame), yx, userid, tp, loginticket);

            return(Url);
        }
Exemple #14
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        sServerID = GetServerID(sGame);
            string        money     = dMoney.ToString();
            string        gold      = Convert.ToInt32(dMoney * 10).ToString();
            string        key       = "dao50_df545dfg43_3s435csdf34";
            string        time      = ProvideCommon.getTime().ToString();
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(gold);
            sbText.Append(money);
            sbText.Append(time);
            sbText.Append(key);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(orderid + username + gold + money + time + 密钥)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.txj.dao50.com/game/api/pay.php", sServerID);
            sbText.AppendFormat("?orderid={0}", sOrderID);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&gold={0}", gold);
            sbText.AppendFormat("&money={0}", money);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&flag={0}", flag);
            sbText.AppendFormat("&channel={0}", "");
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #15
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sReturn  = string.Empty;
            string        platform = "dao50";
            string        gkey     = "qfz";
            string        skey     = GetServerID(sGameAbbre);
            string        time     = ProvideCommon.getTime().ToString();
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(platform);
            sbText.Append(gkey);
            sbText.Append(skey);
            sbText.Append(time);
            sbText.Append("#");
            string lkey = "XV1IHNkM2FzZGZrIG8g(*(*^986j2lu2lu8$aWdu1fhi";

            sbText.Append(lkey);
            string sign      = ProvideCommon.MD5(sbText.ToString());//$uid.$platform.$gkey.$skey.$time.'#'.$lkey
            string sQueryUrl = string.Format("http://{0}.qfz.dao50.com/checkuser.html?uid={1}&platform={1}&gkey={2}&skey={3}&time={4}&sign={5}",
                                             skey, sUserID, platform, gkey, skey, time, sign);
            string sRes   = ProvideCommon.GetPageInfo(sQueryUrl);
            string sErrNo = ProvideCommon.getJsonValue("errno", sRes);

            if (sRes == "-1")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Exemple #16
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame, string ip, string otype)
        {
            string        sid     = GetServerID(sGame);        //服务器编号
            string        account = sUserID;
            string        oid     = sOrderID.Substring(0, 32); //订单号 char (32)
            string        money   = iMoney.ToString();
            string        gold    = (iMoney * 10).ToString();
            string        time    = ProvideCommon.getTime().ToString();
            StringBuilder sbText  = new StringBuilder();

            sbText.AppendFormat("tid={0}&", tid);
            sbText.AppendFormat("sid={0}&", sid);
            sbText.AppendFormat("account={0}&", account);
            sbText.AppendFormat("oid={0}&", oid);
            sbText.AppendFormat("otype={0}&", otype);
            sbText.AppendFormat("money={0}&", money);
            sbText.AppendFormat("gold={0}&", gold);
            sbText.AppendFormat("ip={0}&", ip);
            sbText.AppendFormat("time={0}", time);
            string     auth   = Base64.EncodeBase64(sbText.ToString());
            string     verify = ProvideCommon.MD5(string.Format("{0}{1}", auth, key));
            string     sUrl   = string.Format("http://passport.9787.com/api/1/uinterface.php?action=charge&auth={0}&verify={1}", auth, verify);
            string     sRes   = ProvideCommon.GetPageInfo(sUrl);
            JSONObject json   = JSONConvert.DeserializeObject(sRes);
            string     result = json["result"].ToString();

            JSONConvert.clearJson();
            return(result);
        }
Exemple #17
0
        public static string Login(string sUserID, string sGame)
        {
            string        agentName    = "dao50";
            string        TICKET_LOGIN = "******";
            string        serverid     = GetServerID(sGame);
            string        stamp        = ProvideCommon.getTime().ToString();//标准时间戳
            string        fcm          = "1";
            StringBuilder sbText       = new StringBuilder();

            sbText.Append(TICKET_LOGIN);
            sbText.Append(sUserID);
            sbText.Append(stamp);
            sbText.Append(agentName);
            sbText.Append(serverid);
            sbText.Append(fcm);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(LOGIN_KEY + accountName + stamp + agentName + serverID + fcm)

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://web.tgzt.mingchaoonline.com/api/v1/mc/start.php?");
            sbText.AppendFormat("accountName={0}&", sUserID);
            sbText.AppendFormat("stamp={0}&", stamp);
            sbText.AppendFormat("agentName={0}&", agentName);
            sbText.AppendFormat("serverID={0}&", serverid);
            sbText.AppendFormat("fcm={0}&", fcm);
            sbText.AppendFormat("flag={0}", flag);
            string sUrl = sbText.ToString();

            return(sUrl);
        }
Exemple #18
0
        public static string Login(string sUserID, string sGameName)
        {
            string        sLoginTime = ProvideCommon.getTime().ToString();
            string        sKey       = "Mg_dao50_gs_KEY_1OOpePFrTIUEKE23ll33P3hE3JeoOepeKJKJEKLOOeEeE";
            StringBuilder sbText     = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(sLoginTime);
            sbText.Append(sKey);
            string sFlag = Common.ProvideCommon.MD5(sbText.ToString()).ToLower();//md5($username.$time.$key) 这里传递的md5字串为小写字母

            sbText.Remove(0, sbText.Length);
            sbText.Append(LoginGameUrl(sGameName));
            sbText.Append("?username="******"&time=");
            sbText.Append(sLoginTime);
            sbText.Append("&isAdult=1");
            sbText.Append("&flag=");
            sbText.Append(sFlag);
            sbText.Append("&op=dao50");
            string sServer = ServerName(sGameName);

            sbText.AppendFormat("&server={0}", sServer);
            return(sbText.ToString());
        }
Exemple #19
0
        public static string Login(string sUserID, string sGame)
        {
            string        account            = sUserID;
            string        tstamp             = ProvideCommon.getTime().ToString();
            string        fcm                = "1";//0为未通过 1为通过 2未填写
            string        server_id          = sGame.Replace("yjxy", "");
            string        GAME_TICKET_SUBFIX = "15bc795ee011b9b2f82b915a4c85ec73";
            StringBuilder sbText             = new StringBuilder();

            sbText.Append(account);
            sbText.Append(tstamp);
            sbText.Append(fcm);
            sbText.Append(server_id);
            sbText.Append(GAME_TICKET_SUBFIX);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5(account+timestamp+fcm+server_id+GAME_TICKET_SUBFIX)

            sbText.Remove(0, sbText.Length);
            string sServerHost = ServerHost(sGame);

            sbText.AppendFormat("http://{0}/start.php?", sServerHost);
            sbText.AppendFormat("account={0}", account);
            sbText.AppendFormat("&tstamp={0}", tstamp);
            sbText.AppendFormat("&fcm={0}", fcm);
            sbText.AppendFormat("&server_id={0}", server_id);
            sbText.AppendFormat("&ticket={0}", ticket);
            return(sbText.ToString());
        }
Exemple #20
0
        public static string Login(string sUserID, string sGame)
        {
            string        agentid      = "15";
            string        TICKET_LOGIN = "******";
            string        serverid     = GetServerID(sGame);
            string        tstamp       = ProvideCommon.getTime().ToString();//标准时间戳
            string        fcm          = "1";
            StringBuilder sbText       = new StringBuilder();

            sbText.Append(TICKET_LOGIN);
            sbText.Append(sUserID);
            sbText.Append(tstamp);
            sbText.Append(agentid);
            sbText.Append(serverid);
            sbText.Append(fcm);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5(API_SECURITY_TICKET_LOGIN + account + tstamp+ agentid + serverid +fcm)

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://web.xlfc.dao50.com/user/start.php?");
            sbText.AppendFormat("account={0}&", sUserID);
            sbText.AppendFormat("tstamp={0}&", tstamp);
            sbText.AppendFormat("agentid={0}&", agentid);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("fcm={0}&", fcm);
            sbText.AppendFormat("ticket={0}&", ticket);
            string sUrl = sbText.ToString();

            return(sUrl);
        }
Exemple #21
0
        public static string Login(string sUserID, string sGame, string sClient)
        {
            string        spid       = "lin";
            string        server_num = GetServerID(sGame);
            string        fcm        = "1";
            string        time       = ProvideCommon.getTime().ToString();
            string        key        = "5c22fb494ba87294287fe5e743a7fe07";
            StringBuilder sbText     = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", server_num);
            sbText.AppendFormat("{0}", key);
            sbText.AppendFormat("{0}", time);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5 ( username . server_num . KEY . time )

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.ahxx.dao50.com/login.php?", server_num);
            sbText.AppendFormat("spid={0}", spid);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&server_num={0}", server_num);
            sbText.AppendFormat("&fcm={0}", fcm);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&sign={0}", sign);
            sbText.AppendFormat("&client={0}", sClient);
            return(sbText.ToString());
        }
Exemple #22
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sReturn     = string.Empty;
            string        TICKET_INFO = "dao50::XLFC::INFO::KEY::03IAM3DmCp8myAwfqWre";
            string        agentid     = "15";
            string        serverid    = GetServerID(sGameAbbre);
            string        time        = ProvideCommon.getTime().ToString();
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(TICKET_INFO);
            sbText.Append(time);
            sbText.Append(sUserID);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5($API_SECURITY_TICKET_INFO,$time.$user_name)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://web.xlfc.dao50.com/api/info.player.php?";

            sbText.Append(TranURL);
            sbText.AppendFormat("user_name={0}&", sUserID);
            sbText.AppendFormat("agentid={0}&", agentid);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("t={0}&", time);
            sbText.AppendFormat("s={0}", sign);
            string sRes = ProvideCommon.GetPageInfo(sbText.ToString());

            if (sRes == "not found")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #23
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        serverid = GetServerID(sGameAbbre);
            string        ts       = ProvideCommon.getTime().ToString();
            string        key      = "308494a405f92ca02c74d562aed83ce3";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", ts);
            sbText.AppendFormat("{0}|", serverid);
            sbText.Append(key);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$ts|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.yjxy.dao50.com/intf/general/get_user_info.php?", serverid);
            sbText.AppendFormat("accname={0}", sUserID);
            sbText.AppendFormat("&ts={0}", ts);
            sbText.AppendFormat("&serverid={0}", serverid);
            sbText.AppendFormat("&sign={0}", ticket);
            string sUrl    = sbText.ToString();
            string sRes    = ProvideCommon.GetPageInfo(sUrl);
            string sReturn = string.Empty;

            if (sRes.IndexOf("\"ret\":1") > -1)
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #24
0
        public static string Login(string sUserID, string sGame)
        {
            string        center_id = "1073";
            string        serverid  = GetServerID(sGame);
            string        fcm       = "1";
            string        time      = ProvideCommon.getTime().ToString();
            string        key       = "siawVVD8vDf834jFiek";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", center_id);
            sbText.AppendFormat("{0}", serverid);
            sbText.AppendFormat("{0}", fcm);
            sbText.AppendFormat("{0}", time);
            sbText.AppendFormat("{0}", key);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5 ( username . server_num . KEY . time )

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.jjp.dao50.com/inf_login.jsp?", serverid);
            sbText.AppendFormat("account={0}", sUserID);
            sbText.AppendFormat("&center_id={0}", center_id);
            sbText.AppendFormat("&server_id={0}", serverid);
            sbText.AppendFormat("&fcm={0}", fcm);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&sign={0}", sign);
            return(sbText.ToString());
        }
Exemple #25
0
        private const string key = "{b779f2dd-d532-3566-e0ab-9d3312f20919}";//"{D4EE863A-3714-4EE9-9F04-C7E3DC3E9924}";

        public static string Login(string sUserID, string sGame, string sSource)
        {
            string user    = sUserID;
            string time    = ProvideCommon.getTime().ToString();//标准时间戳
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string        sRegDate  = UserBll.RegTimeSel(iUserID);
            string        sRegDateC = ProvideCommon.getTime(DateTime.Parse(sRegDate)).ToString();
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(user);
            sbText.AppendFormat("_{0}_", time);
            string hash = string.Empty;

            if (sSource != null && sSource.Length > 0)
            {
                sbText.AppendFormat("{0}_", sSource);
            }
            sbText.Append(key);
            hash = ProvideCommon.MD5(sbText.ToString());//md5(user_time_平台密钥)
            sbText.Remove(0, sbText.Length);
            string serverdomain = GetDomain(sGame);

            sbText.AppendFormat("http://{0}/login_api.php?", serverdomain);
            sbText.AppendFormat("user={0}&", user);
            sbText.AppendFormat("time={0}&", time);
            sbText.AppendFormat("hash={0}&", hash);
            sbText.AppendFormat("source={0}&", sSource);
            sbText.AppendFormat("regdate={0}&", sRegDateC);
            sbText.Append("non_kid=1");
            string sUrl = sbText.ToString();

            return(sUrl);
        }
Exemple #26
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        serverid = GetServerID(sGameAbbre);
            string        ts       = ProvideCommon.getTime().ToString();
            string        key      = "ySfWw4F0AVyK7TqyfxPnjOtuVCZLOvSu";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", ts);
            sbText.AppendFormat("{0}", key);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$ts|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.wwsg.dao50.com/api/union/user_info.php?", serverid);
            sbText.AppendFormat("username={0}", sUserID);
            sbText.AppendFormat("&time={0}", ts);
            sbText.AppendFormat("&flag={0}", ticket);
            string sUrl     = sbText.ToString();
            string sRes     = ProvideCommon.GetPageInfo(sUrl);
            string sJsonRes = ProvideCommon.getJsonValue("code", sRes);
            string sReturn  = string.Empty;

            switch (sJsonRes)
            {
            case "-3":
                sReturn = "1";
                break;

            default:
                sReturn = "0";
                break;
            }
            return(sReturn);
        }
Exemple #27
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        SECURITY_TICKET_PAY = "59cffe0f86ceb8bda13947b277f47ddc";
            int           golden   = Convert.ToInt32(dMoney) * 10;
            string        tstamp   = ProvideCommon.getTime().ToString();
            string        serverid = GetServerID(sGame);
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(SECURITY_TICKET_PAY);
            sbText.AppendFormat("golden{0}", golden);
            sbText.AppendFormat("loginname{0}", sUserID);
            sbText.AppendFormat("orderid{0}", sOrderID);
            sbText.AppendFormat("serverid{0}", serverid);
            sbText.AppendFormat("tstamp{0}", tstamp);
            string ticket  = ProvideCommon.MD5(sbText.ToString());
            string TranURL = string.Format("http://s{0}.khbd.dao50.com:9130/ops/addpay/ops/addpay", serverid);

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("orderid={0}&loginname={1}&golden={2}&tstamp={3}&ticket={4}&serverid={5}",
                                sOrderID, sUserID, golden, tstamp, ticket, serverid);
            string sRes    = ProvideCommon.GetPageInfoByPost(TranURL, sbText.ToString(), "UTF-8");
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", TranURL, sbText.ToString());

            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #28
0
        public static string Login(string sUserID, string sGame, string sLoginType)
        {
            string        platform = "dao50";
            string        gkey     = "qfz";
            string        skey     = GetServerID(sGame);
            string        time     = ProvideCommon.getTime().ToString();
            string        is_adult = "1";
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(platform);
            sbText.Append(gkey);
            sbText.Append(skey);
            sbText.Append(time);
            sbText.Append(is_adult);
            sbText.Append("#");
            string lkey = "XV1IHNkM2FzZGZrIG8g(*(*^986j2lu2lu8$aWdu1fhi";

            sbText.Append(lkey);
            string sign     = ProvideCommon.MD5(sbText.ToString());//md5($uid.$platform.$gkey.$skey.$time.$is_adult.'#'.$lkey)
            string back_url = "http://www.dao50.com/yxzq/qfz/";
            string sGameUrl = string.Format("http://{3}.qfz.dao50.com/login.html?uid={0}&platform={1}&gkey={2}&skey={3}&time={4}&is_adult={8}&back_url={5}&type={6}&sign={7}",
                                            sUserID, platform, gkey, skey, time, back_url, sLoginType, sign, is_adult);

            return(sGameUrl);
        }
Exemple #29
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string op_id      = "115";
            string sid        = GetServerID(sGame);
            string account    = sUserID;
            int    iMoney     = Convert.ToInt32(dMoney);
            int    iGameMoney = iMoney * 10;
            //int iGameMoney = Convert.ToInt32(dMoney * 10);
            string game_money = iGameMoney.ToString();
            string u_money    = iMoney.ToString();
            string time       = ProvideCommon.getTime().ToString();
            string sAuth      = string.Format("op_id={0}&sid={1}&game_id=36&account={2}&order_id={3}&game_money={4}&u_money={5}&time={6}",
                                              op_id, sid, account, sOrderID, game_money, u_money, time);
            string sBase64Auth = Base64.EncodeBase64(sAuth);
            string sVerify     = ProvideCommon.MD5(string.Format("{0}{1}", sBase64Auth, key));
            string sPayUrl     = string.Format("http://up.uuzu.com/api/commonAPI/charge?auth={0}&verify={1}", sBase64Auth, sVerify);
            string sRes        = ProvideCommon.GetPageInfo(sPayUrl);
            string user_ip     = ProvideCommon.GetRealIP();
            int    iUserID     = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sPayUrl, sOrderID, sRes, sGame, iUserID);
            string sCode = ProvideCommon.getJsonValue("status", sRes);

            return(sCode);
        }
Exemple #30
0
        public static string Login(string sUserID, string sGame)
        {
            string        server_id = GetServerID(sGame);
            string        timestamp = ProvideCommon.getTime().ToString();
            string        sLoginKey = "dao50_sdfwrsd2g_dfgd4sdf3dsf";
            string        cm        = "1";
            string        site      = "txj";
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(timestamp);
            sbText.Append(sLoginKey);
            sbText.Append(cm);
            sbText.Append(site);
            sbText.Append(server_id);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5($username . $time . $key . $cm . $site . $server_id)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.txj.dao50.com/game/login.php?", server_id);
            sbText.AppendFormat("username={0}", sUserID);
            sbText.AppendFormat("&time={0}", timestamp);
            sbText.AppendFormat("&flag={0}", flag);
            sbText.AppendFormat("&cm={0}&site={1}", cm, site);
            sbText.AppendFormat("&server_id={0}", server_id);
            return(sbText.ToString());
        }