473,236 Members | 1,388 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,236 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 5947
"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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.