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

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service

PHP & Java
Hello,

can PHP code be used inside java code?

Code: <SCRIPT LANGUAGE="Java

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

How to grab certain words ??
I am working with this API

Returns JSON.
curl http://letsbetrends.com/api/current_trends

onclick problem
I have <input type="text" name="message">
<a href=page2.

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

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