|
-
Aug 13th, 2007, 11:01 AM
#1
Thread Starter
Lively Member
winsock instead of internet control
how would i go about like connecting winsock to a web site to fill a form like i would in internet conrol like
Code:
webbrowser1.document.all"name".value ="new value"
or even using insert..
-
Aug 13th, 2007, 11:43 AM
#2
Re: winsock instead of internet control
Moved from Database Development forum, as this is not related to databases
-
Aug 13th, 2007, 01:17 PM
#3
Frenzied Member
Re: winsock instead of internet control
If you are using winsock you would not even need to load the original page that contains the form. Just look up how the http protocol works and you can use GET or POST to send the form contents. It's going to be a lot more complicated than using the internet control and it won't be object oriented.
-
Aug 13th, 2007, 01:58 PM
#4
Re: winsock instead of internet control
Just send the HTTP POST header. It's not hard. I don't remember off hand but it's something like:
vb Code:
Private Sub Winsock1_Connect()
Dim strHTTP As String
strHTTP = "POST /page.php HTTP/1.1" & vbCrLf
strHTTP = strHTTP & "Host: www.thesite.com" & vbCrLf
strHTTP = strHTTP & "User-Agent: VB" & vbCrLf
strHTTP = strHTTP & "Accept: *.*" & vbCrLf
strHTTP = strHTTP & "Connection: Keep-Alive" & vbCrLf & vbCrLf
strHTTP = strHTTP & "page.php?field1=value&field2=value&field3=value" & vbCrLf
Winsock1.SendData strHTTP
End Sub
That's probably wrong but a simple search on the internet will show you the right way. Or download the free packet sniffer called Ethereal. Start it up, visit the website and submit the form. It will show you the correct data to send.
-
Aug 13th, 2007, 11:51 PM
#5
Thread Starter
Lively Member
Re: winsock instead of internet control
can someone like help me understand instr whenim using internet controller thx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|