string Sign; //定义验证参数 /// <summary> /// 烈焰登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("id=" + gu.UserName + "&now=" + tstamp + "." + gc.LoginTicket, 32); //获取验证码 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?id=" + gu.UserName + "&time=" + tstamp + "&isAdult=1&is_client=" + IsPC + "&sign=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 斗破乾坤登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登录地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("account=" + gu.UserName + "&agent=" + gc.AgentId + "&fcm=1&fcm_time=-1&serverid=" + gs.ServerNo + "&time=" + tstamp + "&way=1&" + gc.LoginTicket, 32); string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?account=" + gu.UserName + "&agent=" + gc.AgentId + "&fcm=1&fcm_time=-1&serverid=" + gs.ServerNo + "&time=" + tstamp + "&way=1&token=" + Sign; return(LoginUrl); }
/// <summary> /// 封天传登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("{" + gu.UserName + gc.LoginTicket + tstamp + "}", 32); //获取验证码 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?userName="******"&time=" + tstamp + "&sign=" + Sign + "&source=tt&serverId=" + gs.ServerNo; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 天行剑登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gu.UserName + tstamp + gc.LoginTicket + "1txj" + gs.QuFu, 32); string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?username="******"&time=" + tstamp + "&flag=" + Sign + "&cm=1&site=txj&server_id=" + gs.QuFu; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 神将三国登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <returns>返回登录地址</returns> public string Login(int UserId, int ServerId, int IsPc) { gu = gus.GetGameUser(UserId); //获取要登录用户 gs = gss.GetGameServer(ServerId); //获取要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gu.UserName + tstamp + gc.LoginTicket + "1", 32); //获取验证参数 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?username="******"&time=" + tstamp + "&cm=1" + "&flag=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数' /// <summary> /// 最无极登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否客户端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gu.Id + gu.UserName + gs.QuFu + "1" + tstamp + gc.LoginTicket, 32); //获取验证码 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?user_id=" + gu.Id + "&user_name=" + gu.UserName + "&time=" + tstamp + "&is_adult=1&sign=" + Sign + "&server_id=" + gs.QuFu; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 怒斩登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <returns>返回登录地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 string sign = DESEncrypt.Md5(gu.Id + gu.UserName + tstamp + "1" + gc.LoginTicket, 32); string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "login.php?u=" + UserId + "&n=" + gu.UserName + "&t=" + tstamp + "&cm=1&p=" + sign + "&type=ie&s=" + gs.ServerNo; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 可乐三国登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("cardId=1&cardName=1&cm=1&name=myname&platId=" + gc.AgentId + "&platUid=" + gu.UserName + "&sid=" + gs.ServerNo + "&srcId=" + gc.AgentId + "&tm=" + tstamp + "&" + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gc.LoginCom + "?cardId=1&cardName=1&cm=1&name=myname&platId=" + gc.AgentId + "&platUid=" + gu.UserName + "&sid=" + gs.ServerNo + "&srcId=" + gc.AgentId + "&tm=" + tstamp + "&sig=" + Sign; //生成登录地址 return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 太古遮天登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否客户端</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gc.LoginTicket + gu.UserName + tstamp + gc.AgentId + gs.QuFu + "1", 32); //获取验证码 string LoginUrl = "http://" + gc.LoginCom + "/api/v1/mc/start.php?accountName=" + gu.UserName + "&stamp=" + tstamp + "&agentName=" + gc.AgentId + "&serverID=" + gs.QuFu + "&fcm=1&flag=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 街机三国登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gu.Id + gc.AgentId + tstamp + gs.ServerNo + gc.LoginTicket, 32); string LoginUrl = "http://" + gc.LoginCom + "?user="******"&time=" + tstamp + "&server_id=" + gs.ServerNo + "&platform=" + gc.AgentId + "&sign=" + Sign + "&non_kid=1&source=®date=&backurl="; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 热血海贼王登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取要登录用户 gs = gss.GetGameServer(ServerId); //获取要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("qid=" + gu.Id + "&time=" + tstamp + "&server_id=" + gs.ServerNo + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?qid=" + gu.Id + "&time=" + tstamp + "&server_id=" + gs.ServerNo + "&sign=" + Sign + "&isAdult=1"; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 楚汉传奇登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPc) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("from=" + gc.AgentId + "game=chuhan" + "server=" + gs.ServerNo + "user_id=" + gu.UserName + "fatigue=2" + "t=" + tstamp + "login_secret_signature=" + gc.LoginTicket, 32); //获取验证码 string LoginUrl = "http://" + gc.LoginCom + "?from=" + gc.AgentId + "&game=chuhan&server=" + gs.ServerNo + "&user_id=" + gu.UserName + "&fatigue=2&t=" + tstamp + "&signature=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 大清英雄传登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否客户端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); Sign = DESEncrypt.Md5(gu.UserName + gc.AgentId + "1" + gs.ServerNo + "1" + tstamp + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gc.LoginCom + "?sid=" + gc.AgentId + "&gid=" + "GameId" + "&servid=" + gs.ServerNo + "&username="******"&isAdult=1&time=" + tstamp + "&MD5=" + Sign; //生成登录地址 return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 绝代双骄登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取要登录用户 gs = gss.GetGameServer(ServerId); //获取要登录的服务器 tstamp = DateTime.Now.ToString("yyyyMMddHHmmss"); //获取时间戳 Sign = DESEncrypt.Md5("uid=" + gu.Id + "&uname=" + gu.UserName + "&lgtime=" + tstamp + "&uip=" + BBRequest.GetIP().Replace(".", "_") + "&type=" + gc.AgentId + "&sid=" + gs.ServerNo + "&key=" + gc.LoginTicket, 32); string LoginUrl = "http://" + gc.LoginCom + "?uid=" + gu.Id + "&uname=" + gu.UserName + "&lgtime=" + tstamp + "&uip=" + BBRequest.GetIP().Replace(".", "_") + "&type=" + gc.AgentId + "&sid=" + gs.ServerNo + "&sign=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 仙侠傲世登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否客户端</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gu.UserName + tstamp + "0" + DESEncrypt.Md5(gc.LoginTicket, 32), 32); //获取验证码 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "/api/login.php?account=" + gu.UserName + "&time=" + tstamp + "&flag=" + Sign + "&fcm=0&server_id=" + gs.ServerNo; return(LoginUrl); }
/// <summary> /// 一剑轩辕登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); Sign = DESEncrypt.Md5(gu.UserName + "|" + tstamp + "|" + gs.QuFu + "|" + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?accname=" + gu.UserName + "&ts=" + tstamp + "&serverid=" + gs.QuFu + "&fcm=0&sign=" + Sign; //生成登录地址 return(LoginUrl); }
string Auth; //定义验证码 /// <summary> /// 天界登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <returns>返回登录地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取要登录用户 gs = gss.GetGameServer(ServerId); //获取要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Base64Protector bp = new Base64Protector(); Auth = bp.Base64Code(string.Format("sid={0}&uid={1}&time={2}&indulge={3}", gs.ServerNo, gu.UserName, tstamp, "n")); Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&sign=" + Sign; return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 猎魔登陆接口 /// </summary> /// <param name="Id">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPc">是否PC端登陆</param> /// <returns></returns> public string Login(int Id, int ServerId, int IsPc) { gu = gus.GetGameUser(Id); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5(gc.AgentId + "|" + gu.Id + "|1233|" + gs.ServerNo + "|" + tstamp + "|1|" + gc.LoginTicket, 32); //获取验证码 string LoginDelURL = "http://" + gc.LoginCom + "?site=" + gc.AgentId + "&uid=" + gu.Id + "&game=1233&num=" + gs.ServerNo + "&fcm=1&time=" + tstamp + "&sign=" + Sign; string LoginResult = Utils.GetWebPageContent(LoginDelURL); string[] R = LoginResult.Replace("[", "").Replace("]", "").Split(','); string LoginUrl = R[1].Replace("\"", "").Replace("\\", "");; return(LoginUrl); }
string Auth; //定义验证码 /// <summary> /// 大将军登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登录地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 string url = string.Format("op_id={0}&sid={1}&game_id={2}&account={3}&adult_flag={4}&game_time={5}&ip={6}&ad_info={7}&time={8}", gc.AgentId, gs.ServerNo, 7, gu.UserName, 1, 13359459, BBRequest.GetIP(), "", tstamp); //获取验证字符串 Base64Protector bp = new Base64Protector(); Auth = bp.Base64Code(url); //获取验证码 Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&verify=" + Sign; //生成登录地址 return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 江湖问剑登录接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登录</param> /// <returns>返回登录接口</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 Sign = DESEncrypt.Md5("fcm" + "n" + "gid" + "221" + "pid" + gc.AgentId + "sid" + gs.QuFu + "time" + tstamp + "uid" + gu.UserName + gc.LoginTicket, 32); //获取验证码 string LoginUrl = "http://" + gc.LoginCom + "?pid=" + gc.AgentId + "&gid=221&sid=" + gs.QuFu + "&uid=" + gu.UserName + "&time=" + tstamp + "&fcm=n&sign= " + Sign; if (IsPC == 1) { LoginUrl += "&client=pc"; } else { LoginUrl += "&client=web"; } return(LoginUrl); }
string Auth; //定义验证码 /// <summary> /// 九龙朝登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 string url = string.Format("sid={0}&uid={1}&time={2}&indulge={3}", gs.ServerNo, gu.UserName, tstamp, "n"); //获取验证字符串 Base64Protector bp = new Base64Protector(); Auth = bp.Base64Code(url); //获取验证码 Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32); //获取验证参数 string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&sign=" + Sign; //生成登录地址 if (IsPC == 1) { LoginUrl += "&play_gamecode&isclient=1"; } return(LoginUrl); }
string Sign; //定义验证参数 /// <summary> /// 盗魂传登陆接口 /// </summary> /// <param name="UserId">用户Id</param> /// <param name="ServerId">服务器Id</param> /// <param name="IsPC">是否PC端登陆</param> /// <returns>返回登陆地址</returns> public string Login(int UserId, int ServerId, int IsPC) { gu = gus.GetGameUser(UserId); //获取当前登录用户 gs = gss.GetGameServer(ServerId); //获取用户要登录的服务器 tstamp = Utils.GetTimeSpan(); //获取时间戳 string LoginUrl = ""; Sign = DESEncrypt.Md5(gc.AgentId + "|" + gu.UserName + "|" + gs.ServerNo + "|" + tstamp + "|" + "2" + "|" + gc.LoginTicket, 32); //获取验证参数 if (IsPC == 0) { string Url = "http://" + gc.LoginCom + "?ptid=" + gc.AgentId + "&account=" + gu.UserName + "&areaid=" + gs.ServerNo + "&tt=" + tstamp + "&fcm=" + 2 + "&sign=" + Sign; //生成登录地址 LoginUrl = Url; } else if (IsPC == 1) { string Url = "http://" + gc.LoginCom + "?ptid=" + gc.AgentId + "&account=" + gu.UserName + "&areaid=" + gs.ServerNo + "&tt=" + tstamp + "&fcm=" + 2 + "&sign=" + Sign + "&logintype=2"; //生成登录地址 LoginUrl = Url; } return(LoginUrl); }
/// <summary> /// 获取用户信息 /// </summary> /// <param name="UserId">用户Id</param> /// <returns>返回用户</returns> public GameUser GetGameUser(int UserId) { return(gus.GetGameUser(UserId)); }