Tag: joomla

从ac#application登录joomla

我使用很多方法登录到joomla管理面板。 但返回的值与登录页面相同。 即使用户名和密码正确。 例: WebClient Client = new WebClient(); System.Collections.Specialized.NameValueCollection Collection = new System.Collections.Specialized.NameValueCollection(); Collection.Add(“username”, “–my username–“); Collection.Add(“passwd”, “–my password–“); Collection.Add(“option”, “com_login”); Colletion.Add(“e0484cdc56d8ccc42187d26a813324ba”, “1”); Collection.Add(“lang”, “”); Client.Proxy = null; byte[] res = Client.UploadValues( “http://127.0.0.1/administrator/index.php”, “POST”, Collection); textBox1.Text = Encoding.UTF8.GetString(res, 0, res.Length);

c#应用程序登录到joomla

我需要连接到网站的管理面板(Joomla 2.5)。 我的问题与此主题非常相似,但我没有找到解决方案,所以我正在寻求您的帮助。 这是我的示例代码: WebClient Client = new WebClient(); System.Collections.Specialized.NameValueCollection Collection = new System.Collections.Specialized.NameValueCollection(); Collection.Add(“username”, “–my username–“); Collection.Add(“passwd”, “–my password–“); Collection.Add(“option”, “com_login”); Collection.Add(“lang”, “”); Collection.Add(“task”, “login”); //I find the token byte[] res = Client.UploadValues(“http://mysite/administrator/index.php”, “POST”, Collection); string source = Encoding.UTF8.GetString(res, 0, res.Length); Regex regex = new Regex(“([a-zA-z0-9]{32})”) Match match = regex.Match(source); if (match.Success) string token […]