Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String encodedLoginUserName = URLEncoder.encode(loginUserName, "UTF-8");
- + String encodedLoginPassword = URLEncoder.encode(loginPassword, "UTF-8");
- + String strUserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.126 Safari/533.4";
- + String content = "action=login2" + "&" + "site_ID=" + encodedLoginUserName + "&" + "pw=" + encodedLoginPassword + "&" + "referrer=";
- +
- + url = new URL(targetLoginUrl);
- +
- + // Create the request
- + urlconnection = url.openConnection();
- + urlconnection.setDoInput(true);
- + urlconnection.setDoOutput(true);
- + urlconnection.setUseCaches(false);
- + urlconnection.setAllowUserInteraction(false);
- + urlconnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
- + urlconnection.setRequestProperty("User-Agent", strUserAgent);
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement