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

Discussion in 'C++' started by rup, Jan 6, 2007.

  1. rup

    rup Guest

    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
    rup, Jan 6, 2007
    #1
    1. Advertising

  2. rup

    Jim Langston Guest

    "rup" <> wrote in message
    news:...
    > 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.
    Jim Langston, Jan 6, 2007
    #2
    1. Advertising

  3. rup

    rup Guest

    Jim Langston wrote:
    > "rup" <> wrote in message
    > news:...
    > > 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.
    rup, Jan 6, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,016
    John Saunders
    Oct 16, 2003
  2. Replies:
    6
    Views:
    4,822
    Tor Iver Wilhelmsen
    Aug 29, 2005
  3. rup
    Replies:
    10
    Views:
    708
    CBFalconer
    Jan 7, 2007
  4. arnuld
    Replies:
    6
    Views:
    603
    arnuld
    Sep 5, 2007
  5. Morgan Cheng
    Replies:
    2
    Views:
    704
    Morgan Cheng
    Jun 23, 2007
Loading...

Share This Page