Sending and Receiving HTTP data.... newbie

K

kasthurirangan.balaji

Can someone please advise me how to send a HTTP request:http://www.somewebsever.com/http-api.php?action=send&user=USER&passwo...

and receive the response?

TIA

1)To send a http request, you should first know about the http
protocol. There are many sites about the http protocol or refer the
rfc.
2)By default in c++, there is no socket library. You need to use 'C'
socket libraries.
3)You should either know the ip address/port number or should have dns
enabled in your machine.
4)If you know the ip address/port number, you can use it directly in
your program or use relevant system calls with the name
"somewebserver"(gethostent/gethostbyaddr.....).
5)Finally, create a client program(since you sending to a server),
send the http request and get the response from the server(also in
http format).

This is just in-brief. Days together of lectures can be provided on
this topic.

Thanks,
Balaji.
 
D

Default User

2)By default in c++, there is no socket library. You need to use 'C'
socket libraries.

By default in C, there is no socket library either. In practice,
different implementations have ones that can differ by various amounts.





Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top