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

MII Netweaver Server stopped due to CPIC connection Problem
Dear Experts,
We have SAP XMII 12.0 setup running on Netweaver 2004s,7.0, Java Stack only.

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

Merger of 6 sister companies under one flagship company after go live
Dear Experts,
I need one help regarding Merger of sister companies of same group. currently we

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

TCP Sending Unsigned Char...
Hi...

I want to send over tcp/ip some data, i have the data in hexadecimal, and when i tr

$_POST
Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, Fo

Nested (echoed) php running wrong script
Got a problem with a php website I'm creating.

In a nutshell, the first page is entirely html

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