我正在尝试登录网站并取回代码,但我收到“无效密码或登录名”,但我确定它们都可以
这是我的代码的一部分:
HttpPost httppost = new HttpPost("http://www3.mackenzie.com.br/tia/index2.php");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("username", username));
nameValuePairs.add(new BasicNameValuePair("password", password));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
String str = inputStreamToString(response.getEntity().getContent()).toString();
我正在尝试访问此页面: http ://www3.mackenzie.com.br/tia/index2.php
我不确定是否应该输入“用户名”和“密码”或其他内容?我怎么能识别呢?我的问题可能是什么?
感谢您的帮助 =)