I
Imogen
Gast
Hallo
Ich greife über die apache libs (commons-httpclient-3.0.1.jar/commons-codec-1.3.jar) auf eine php Seite zu.
Hier der Code:
HttpClient client = new HttpClient();
// build post request
PostMethod post = new PostMethod(https://authentication.x.org/x.php);
NameValuePair[] postMsg = new NameValuePair[] {
new NameValuePair(PARAM_APP_METHOD, appMethod),
new NameValuePair(PARAM_APP_CODE, plainAuthCode),
new NameValuePair(PARAM_APP_VERSION, this.version),
new NameValuePair(PARAM_MACHINE_CODE, this.machineid),
new NameValuePair(PARAM_APP_ID, Activation.APPID)
};
post.setRequestBody(postMsg);
Das Funktioniert alles gut, jetzt möchte ich noch 3 Params mitgeben (username, passwort und server). Weiss jemand wie ich die 3 Params jetzt noch mitgeben kann?
Danke
Imogen[/code]
Ich greife über die apache libs (commons-httpclient-3.0.1.jar/commons-codec-1.3.jar) auf eine php Seite zu.
Hier der Code:
HttpClient client = new HttpClient();
// build post request
PostMethod post = new PostMethod(https://authentication.x.org/x.php);
NameValuePair[] postMsg = new NameValuePair[] {
new NameValuePair(PARAM_APP_METHOD, appMethod),
new NameValuePair(PARAM_APP_CODE, plainAuthCode),
new NameValuePair(PARAM_APP_VERSION, this.version),
new NameValuePair(PARAM_MACHINE_CODE, this.machineid),
new NameValuePair(PARAM_APP_ID, Activation.APPID)
};
post.setRequestBody(postMsg);
Das Funktioniert alles gut, jetzt möchte ich noch 3 Params mitgeben (username, passwort und server). Weiss jemand wie ich die 3 Params jetzt noch mitgeben kann?
Danke
Imogen[/code]