Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string account = "bill";
- string password = "pass1000";
- string ip = new WebClient().DownloadString("http://icanhazip.com");
- ASCIIEncoding encoding = new ASCIIEncoding();
- string postData = "account=" + account + "&password=" + password + "&ip=" + ip;
- byte[] data = encoding.GetBytes(postData);
- WebRequest request = WebRequest.Create("http://WEBSITE.COM/post.php");
- request.Method = "POST";
- request.ContentType = "application/x-www-form-urlencoded";
- request.ContentLength = data.Length;
- Stream stream = request.GetRequestStream();
- stream.Write(data, 0, data.Length);
- stream.Close();
- if (isset($_GET['postData'])){
- //insert account, password, ip, to my database.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement