Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Downloading HTML Source with Winsock
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GlobeTrotter




PostPosted: Mon Mar 20, 2006 6:03 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
HazySmoke)345




PostPosted: Mon Mar 20, 2006 6:41 pm   Post subject: (No subject)

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:

VisualBASIC:
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




PostPosted: Mon Mar 20, 2006 8:41 pm   Post subject: (No subject)

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.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: