
-----------------------------------
GlobeTrotter
Mon Mar 20, 2006 6:03 pm

Downloading HTML Source with Winsock
-----------------------------------
I want to create a simple function/module

DownloadSourceCode(strURL) As String 

It most certainly does not seem hard. It is described in detail here: 
http://www.ostrosoft.com/vb/projects/get_html_source.asp 

The problem I'm having is that, first of all, I can't seem to condense the code into a single function. Any ideas on how I could do that, please let me know. Secondly, the Winsock control doesn't work for my vb6. It says I don't have an appropriate license. 
Aside from re-installing vb6, is there a work-around? Some kind of executable I can call? I'm so close to being done a large project, this one thing is my last step before completion.

-----------------------------------
HazySmoke)345
Mon Mar 20, 2006 6:41 pm


-----------------------------------
I'm using the professional edition of VB6 and Winsock works fine, so I'm not sure why is that there's no licence.

About downloading the source code... You don't really need winsock for it. I never tried. You can try to use Microsoft Internet Transfer Control as an alternative. For example, if you want Text1 to load the source code of www.google.com, then you can just type this:

Private Sub Form_Load()
    Text1.Text = Inet1.OpenURL("http://www.google.com")
End Sub

Hope that gives you some hint on how to design the function.

-----------------------------------
GlobeTrotter
Mon Mar 20, 2006 8:41 pm


-----------------------------------
Wow, thanks.  That is a lot simpler than using winsock.  Unfortunately, this control doesn't work either.  I suppose I'll have to reinstall VB6.
