title: VB6 Gather updated URLs
body: <p>I have a list of web addresses that I've already generated. The issue is, I believe the site uses php to generate their pages because when one of these addresses is navigated, the site adds a sub-directory to the address.</p>
  
  <p>For example, if I navigate to...</p>
  
  <pre><code>http://www.wowhead.com/item=43
  </code></pre>
  
  <p>the address becomes...</p>
  
  <pre><code>http://www.wowhead.com/item=43/squires-boots
  </code></pre>
  
  <p>The sub-directory is different for every item number.</p>
  
  <p>What I want to do is gather the url I'm redirected to for each address I've generated, and as there's a LOT of addresses (some 127,000), I'm looking for the fastest way possible.</p>
  
  <p>Currently, I'm using the webbrowser control (wb)</p>
  
  <pre><code>Dim l As Long
  Dim ff As Long
  Dim strPerkText as String
  Dim sPaths() As String
  Dim lngTimer As Long
  Const lngWait As Long = 5
  
  strPerkText = OpenFile    'using a sub to get this data
  
  sPaths = Split(strPerkText, vbCrLf)
  
  ff = FreeFile
  
  Open App.Path &amp; "\ItemListURLs.txt" For Output As #ff
      For l = 0 To UBound(sPaths)
          lngTimer = Timer
          wb.Navigate2 sPaths(l)
          Do While wb.READYSTATE &lt;&gt; READYSTATE_COMPLETE
              If Timer - lngTimer &gt;= lngWait Then
                  Exit Do
              End If
              DoEvents
          Loop
          Write #ff, wb.LocationURL
          DoEvents
      Next l
  Close #ff
  </code></pre>
  
  <p>lngWait is the amount of time I have to wait for wb to update with the new url, about 5 seconds per page, barring any errors. That means it would take roughly one week to do all the work with the way I have the program built now. I'm not sure if this can be accomplished any faster with either a different control, with API, or pure native code.</p>
  
  <p>All suggestions are welcome.</p>