Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Winsock syntax

Status
Not open for further replies.

mpdillon

Programmer
Jan 27, 2004
18
0
0
US
I am working on a VB 6 app that will communicate with a third party server control. The server control wants inforamtion posted to it in the following format.


sql2000 = local server's name
"ya_da_ya_da_ya" = information to be posted.

I have used the VB winsock control in my app to connect to the server and send the information.

Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect "10.0.0.113", "1000"

Winsock1.SendData "ya_da_ya_da_ya"

I have confirmed these three lines of code successfully connect to the server app and send the information. However, since I did not incluce the location of "cgi-bin/auth.cgi", the server does not reply.

How do I connect to the location "cgi-bin/auth.cgi"?
I have tried numerous combinations but they are all just guesses. I do not know how or where to put the "cgi-bin/auth.cgi" in the connect statement.

When I open a browser on the sql2000 machine and type in:
the server responds with the correct information.
I am trying to create a winsock control that that sends this data and listens for the response.

Thanks,
pat
 
You are trying to work at the TCP level and the remote end wants HTTP, a "level up" the protocol stack.

While you could do this with the Winsock control it'd be much easier to use an HTTP component like Inet (also called Internet Transfer control) or XMLHTTPRequest or something. Even a VB 6 Usercontrol can do these simple HTTP GET requests by use of the AsyncRead method.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top