1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fake Views with VB code

Discussion in 'Visual Basic 6' started by smitha, Feb 16, 2011.

  1. smitha

    smitha Registered Member

    Joined:
    Oct 13, 2009
    Messages:
    61
    Likes Received:
    39
    Home Page:
    Hi,

    i have a text file 123.txt which has proxys like

    ip1
    ip2
    ip3:80
    ip:8080
    ......

    i have source code for program to open a web page in vb
    now how can i open the webpage with these IP's incooperated.

    any sample code?

    Thanking all.
     
  2. m3ownz

    m3ownz Regular Member

    Joined:
    Dec 12, 2009
    Messages:
    311
    Likes Received:
    135
    How does your code 'open a web page' presently?
    Does it use webbrowser control, webrequest, webclient?

    If, as your post suggests, this is a very simple program who's only purpose is to open a web page (such as a view inflator) then the simplest way would be to loop through each proxy and perform the operation. The basic concept is going to be loading them into an array and looping through them like so:

    HTML:
    'load proxies from file to array
    Dim proxies() As String = IO.File.ReadAllLines("c:\proxies.txt")
    For each proxy As String in proxies
    
    'do something
    
    Next
    
     
    • Thanks Thanks x 2
  3. errabbaa

    errabbaa Registered Member

    Joined:
    Jun 11, 2012
    Messages:
    59
    Likes Received:
    9
  4. inaga

    inaga Newbie

    Joined:
    Feb 4, 2010
    Messages:
    12
    Likes Received:
    3
    Load them into an array as suggested by meownz or parse the file line by line as a string to save on ram. If using the WebBrowser control simply setting the system's proxy should be enough. If that is your route depending on how you do it restarting Internet Explorer may be needed for the settings to take effect. If using a socket then I would suggest checking out errabbaa's post. I personally would prefer the socket over the WebBrowser control, to each his own. There are quite a number of ways to code and implement such an idea.
     
  5. wolverine

    wolverine Newbie

    Joined:
    Jul 7, 2008
    Messages:
    14
    Likes Received:
    0
    Use an array for sure and then follow the link of errabbaa