|
-
Nov 22nd, 1999, 09:20 PM
#1
Thread Starter
New Member
Is there any way that I can make a http connection and download a html page from a url without using the inet object.
I don't have a form to put the object on, as I am developing a ASP active x object, which doesn't have a form.
Appreciate any help on this with VB6,
thanks
-
Nov 23rd, 1999, 04:45 AM
#2
Hyperactive Member
Use Winsock.
Send the follwing data to the http server (usually on port 80):
GET http://www.thisserver.com/index.html
followed by a vbCrLf.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470 Add Me ICQ Me
AIM: TomY10
PERL, JavaScript and VB Programmer
-
Nov 23rd, 1999, 08:30 AM
#3
Lively Member
Try this...
Private Sub Command1_Click()
'connect to server
Winsock1.connect "www.vb-world.net", 80
End Sub
Private Sub Winsock1_Connect()
'send http request (ask for the file)
Winsock1.senddata "GET /index.html HTTP/1.0" & vbclrf & vbcrlf
End Sub
Private Sub Winsock1_DataArrival(bytes as long)
'weve recieved a packet, keep track of it and add it to the text box
Winsock1.getdata TempStr, vbString
text1.text = text1.text & TempStr
End Sub
Private Sub Winsock1_Close()
'its complete, the httpd server automatically closes the connection
'when the file get is complete 
msgbox "Download complete."
End Sub
------------------
Regards,
Paul Rivoli
-------------------
[email protected] http://users.bigpond.com/privoli
[This message has been edited by privoli (edited 11-23-1999).]
-
Nov 24th, 1999, 11:21 AM
#4
PowerPoster
Unfortunately, privoli's suggestion requires you to have a form to put the winsock control on (if i'm not mistaken), so you need to use Winsock APIs i do believe. Don't ask me how though, I'm useless at APIs!! 
Someone called Mystiq who is a member of this BB is a wiz at Winsock API programming apparently, perhaps you should try contacting him.
Regards,
------------------
- Chris
[email protected]
-
Nov 24th, 1999, 08:15 PM
#5
Addicted Member
Chris Eastwood has written a full FTP program using the Inet APIs: Check it out: http://www.codeguru.com/vb/
------------------
"To the glory of God!"
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
|