473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

connection to server, & make GET/POST request in vc++

rup
Hello,
This is my first application on socket programming in vc++. I am facing

problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks

Jan 6 '07 #1
2 5956
"rup" <rt*********@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
Hello,
This is my first application on socket programming in vc++. I am facing

problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks
OT in comp.lang.c++ but I"m feeling generous.

A windows socket class:
http://www.adp-gmbh.ch/win/misc/sockets.html

In use I am using this to request a HTTP file:
Socket->SendLine(( HeaderOnly ? "HEAD " : "GET " ) + DLFileName + "
HTTP/1.0");
Socket->SendLine("Host: " + Host);
Socket->SendLine("");

Any other questions, please ask in a VC++ newsgroup.
Jan 6 '07 #2
rup

Jim Langston wrote:
"rup" <rt*********@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
Hello,
This is my first application on socket programming in vc++. I am facing

problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent....
Thanks

OT in comp.lang.c++ but I"m feeling generous.

A windows socket class:
http://www.adp-gmbh.ch/win/misc/sockets.html

In use I am using this to request a HTTP file:
Socket->SendLine(( HeaderOnly ? "HEAD " : "GET " ) + DLFileName + "
HTTP/1.0");
Socket->SendLine("Host: " + Host);
Socket->SendLine("");

Any other questions, please ask in a VC++ newsgroup.
Thanks Jim Langston for your reply. But can u give me some clear idea .
Here is my code for your consideration.
CSocket m_SockClient;
m_SockClient.Create();
BOOL success =FALSE;
success = m_SockClient.Connect("192.168.6.50",80);
if(success ==TRUE)
{ AfxMessageBox("connection established");
}

By doing this connection is established but I am not getting how to
make GET request via HTTP.
I will also send this message on vc++ group. Sorry for your inconvience.

Jan 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a...
2
by: Robert Oschler | last post by:
I am working on a PHP 4 app that interacts with an external authorization server. The external server does "third-party" authorization of users. So I do the following: 1) Each of my PHP scripts...
4
by: James Johnson | last post by:
Dear C#Dex, I am trying to automate a POST to a web page that clicks a button. I have been able to hit a target web page and run the web page. However, the button on the page does not click. ...
3
by: Manoj Kumar | last post by:
I have a web service that gets data from clients. It appears that each time a client connects to the webservice, a new connection/session is created on the server side (IIS 5.1). After 10 calls to...
1
by: Gregory Piñero | last post by:
Hi guys, I'm trying to write a program to get FedEx shipping rates, and I'm following their API as outlined in this document: http://www.fedex.com/us/solutions/wis/pdf/fsm_directmanual.pdf I...
6
by: Arsalan Ahmad | last post by:
Hi all, I am creating a website in which in an Item detail page there are a number of web controls (7 or 8) and what is happening that inside each of control's Page_Load() function I am creating...
4
by: figelwump | last post by:
All, I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy server for any web browser (IE, firefox, etc). I've got it working fine for GET requests. However, when a POST...
2
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
1
by: VagabondSW | last post by:
I am working on a project where my client-side Windows application sends a querystring to a URL on a server hosted in New York. The landing page on that server simply redirects the client to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.