Results 1 to 2 of 2

Thread: Help copying info from a website

  1. #1

    Thread Starter
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219

    Help copying info from a website

    If u look at this link http://www.outwar.com/rankings.php?type=2&start=2 you will see a list of names in yellow. I need to know how to get those names and copy them on to a list in my form. From that list i need to do sumthing else with those names but for now i just need to know how to get those names to the list . thnks a lot
    -Rob

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    VB Code:
    1. Imports System.IO
    2. Imports System.NET
    3.  
    4.         Public Function PageToString(ByVal strPath As String) As String
    5.             Dim client As New WebClient
    6.             Dim strTmp As String
    7.  
    8.             Dim sReader As New StreamReader(client.OpenRead(strPath))
    9.             strTmp = sReader.ReadToEnd()
    10.             client.Dispose()
    11.             sReader.Close()
    12.  
    13.             Return strTmp
    14.  
    15.         End Function

    just pass this function the Page addy and it will put the contents into a string

    then parse out the info that you need.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

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