C++ Http request?


Posted on 16th Feb 2014 07:03 pm by admin

Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = System.Net.WebRequest.Create("http://mywebsite.com/user.php"); string postData = "&do=login&vb_login_username=" + Username.Text + "&vb_login_password=" + Password.Text + "&HWID=" + GETHW.HWID; byte[] send = Encoding.Default.GetBytes(postData); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = send.Length; Stream sout = request.GetRequestStream(); sout.Write(send, 0, send.Length); sout.Flush(); sout.Close(); WebResponse res; try { res = request.GetResponse(); StreamReader sr = new StreamReader(res.GetResponseStream()); Response = sr.ReadToEnd(); } I need to find some libraries for C++ to request a response like this C# program I made does. It sends the request with the specified data, then the script runs, echos a response and the program takes the response and uses it.

Thanks.

No comments posted yet

Your Answer:

Login to answer
201 Like 34 Dislike
Previous forums Next forums
Other forums

writing my own sobel filter convolution - something is wrong
I am trying to keep it very simple, I cant see anything wrong with my logic, could anybody help poin

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this link
example:http://localhost/articlemania/category.php?cid=3

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

Redirecting Admin
In my members table, I have a field called "perm" and it's set to zero for all members. Ho

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

Creating a db with a query
Hello everyone.
I'm having troubles creating a db with a query.
I'm reading a book called PHP

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

creating a 1 to 100 in a table
hi guys I am a newb in php need some help.

I have a table with 1 column and 100 rows and in

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash