Results 1 to 10 of 10

Thread: A good site

  1. #1
    Guest
    Incase you guys didn;t know already, if you go to http://www.vbapi.com, there is a whole bunch of API calls you can learn.

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217

    Wink

    Thanks for the tip, but if you look to the left of your screen you will see the same URL
    (Just in case you didn't know it was an affiliate of this site)

  3. #3
    Guest
    I knew the links were there, but i've never clicked on it and therefor, I never knew the site was there. I found this site when I was surfing the web

  4. #4
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217

    Talking

    Actually, to tell the truth, I found it in the same way. When I realized it was an affiliate of VB-World I felt so stupid for over-looking it for so long! It really is a great site, far easier to use than MSDN. Glad to know I wasn't the only one

  5. #5
    Guest
    Do you know if there's a simple way to download all of the functions? I'm doing it the hard way by clicking on each one. Is there a simpler way?

  6. #6
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217

    Smile

    Write a small application. What I did was write a mini-browser that will automatically go to a set of pages or recursively go through all the links on a page (with some URL filtering) and copy the HTML of each page. It then goes through the HTML and strips out all the tags to make it readable, saving the results in zipped text files. It was a good little project that really wasn't that hard to do.

    (Just make sure it doesn't end up at any porn sites, it'll be looping for hours )

  7. #7
    Guest
    How wold you do this? Do you still have your application? If so, can I take a look at it?

    Thanks in advance.

  8. #8
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    Are you familiar with the Microsoft Internet Transfer Control? It is a simple to use and light-weight control. Downloading a page is as easy as the following:
    Code:
    Private Sub Form_Load
       Inet1.AccessType = icUseDefault
       txtHTML.Text = Inet1.OpenURL("http://www.vbapi.com/ref/index.html", icString)
    End Sub
    As you probably know HTML is just specially formatted text. If you load it into a TextBox you will see the HTML, it is just a little hard to read. However, if you place the HTML text into a RichTextBox it will be far more readable, but will still be in HTML format though. What I did with this text next is compared it to a full list of HTML tags, from here I stripped out everything I knew to be useless for reading and kept only certain parts, such as TITLE, A HREF, and P tags. Whenever I encounter an "A" tag I analyze it to see if it contains a full URL address or just a sub-directory. If it contained a sub then I opened that URL and repeated this whole process for that page. Are you getting the gist of what I did? BTW, the INet control also supports most of the major FTP commands, just incase you are proficient at using them.

    If you need me to elaborate more I'll be happy to help. On a seperate note, which Megatron do take your moniker after? In my opinion the original Lüger version is still the most kick-ass one
    Dan PM
    Analyst Programmer

    VB6 SP3 (also VB4 16-bit sometimes )

  9. #9
    Guest
    I'm really bad at Internet programming so I don't quite undestand. First, to remove the tags, do I use the Instr function? If the Tag is A, so I use the SelStart method to set the cursor a couple positions after the A tag then I use the Selength to to et the full link?

  10. #10
    Guest
    Here's a sample for you, Megatron.

    Code:
    Do Until InStr( ,txtHTML, "<HEAD>") <= 0
        TxtHTML.selStart = InStr( ,txtHTML, "<HEAD>")
        TxtHTML.selLength = 6
        txtHtml.selText = ""
    Loop
    'Obviously, a lot more are needed.


    Code:
    If InStr( ,txtHTML, "<A href = """) Then
        x = InStr( ,txtHTML, "<A href = """)
        For y = x To Len(txtHTML) - 3
           If Mid$(txtHTML, y, 4) = """" Then 
               stop = True
           End If
           If Stop = False Then
               TxtHTML.SelLength = txtHTML.SelLength + 1
               Exit Sub
           End If
           z = Text1.SelText
           'Code to go to the page and transfer
        Next
    End If
    I brought a long-dead post back to life. I'm so proud.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width