4
我使用很多方法登錄到joomla管理面板。 但返回的值與登錄頁面相同。即使用戶名和密碼正確,也可以使用 。從c#應用程序登錄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);