
August 17th, 2000, 07:24 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Senddata Command in ASP????
<i><b>Originally posted by : Ben Scott (pubs_uk@hotmail.com)</b></i><br />Hey Guys,<br /><br />im trying to find out if there is a Senddata command in asp, Im using it in VB6 with the winsock control, basically im trying to find out if i can do the equivalent to this in ASP<br /><br /> Inet.RemoteHost = "www.asite.com": Inet.RemotePort = 80: Inet.Connect<br /> While (Inet.State <> sckConnected) And (Inet.State <> sckError): DoEvents: Wend<br /> <br /> If Inet.State = sckConnected Then<br /> ' Transmit the request to the server via Execute()<br /> headers = "Host: www.asite.com" & vbCrLf _<br /> & "Content-length: " & qlen & vbCrLf _<br /> & "Content-type: application/x-www-form-urlencoded"<br /> <br /> Inet.SendData "POST /cgi/cgiscript.cgi HTTP/1.0" & vbCrLf _<br /> & headers & vbCrLf & vbCrLf _<br /> & query<br /> While (Inet.State = sckConnected): DoEvents: Wend<br /> Inet.Close<br /> <br /> ' Get response code and strip HTTP header<br /> i = InStr(1, buffer, vbCrLf & vbCrLf)<br /> If i > 0 Then buffer = Mid(buffer, i + 4)<br /> MsgBox "The server response was: " & buffer<br /> Else<br /> MsgBox "Could not connect to server"<br /> End If<br /><br /><br />any ideas, or is there a way i can call a cgi script or .asp without the user seeing what is being passed, sorry if these are stupid questions, but im quite new to ASP<br /><br />Cheers n Beers<br /><br />Ben<br />
|