472,119 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 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 5834
"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Robert Oschler | last post: by
4 posts views Thread by James Johnson | last post: by
1 post views Thread by Gregory Piñero | last post: by
1 post views Thread by VagabondSW | last post: by

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.