Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpClient httpclient = new DefaultHttpClient();
- HttpPost httppost = new HttpPost("http://website.com/kundenexecute.php");
- httppost.addHeader("Content-type","application/x-www-form-urlencoded");
- //httppost.setHeader("Content-type:application/x-www-form-urlencoded");
- try {
- // Add your data
- List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
- nameValuePairs.add(new BasicNameValuePair("id", "12345"));
- nameValuePairs.add(new BasicNameValuePair("stringdata", "Hi"));
- httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
- // Execute HTTP Post Request
- HttpResponse response = httpclient.execute(httppost);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement