Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Web;
- using System.Net;
- using System.IO;
- namespace FuseBot
- {
- public static class Login
- {
- public static void LoginVoid(string username, string password, string uriString)
- {
- WebClient myWebClient = new WebClient();
- string postData = "username=" + username + "&password=" + password;
- Console.WriteLine(postData);
- myWebClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
- byte[] byteArray = Encoding.ASCII.GetBytes(postData);
- byte[] responseArray = myWebClient.UploadData(uriString, "POST", byteArray);
- string response = Encoding.ASCII.GetString(responseArray);
- Console.WriteLine(response);
- }
- }
- }
Add Comment
Please, Sign In to add comment