[FONT=Verdana]I coded a small app for my web community last year. It goes through my users database (and up to 100 pages of usernames to a text file) So that I can look at the usernames & make sure nobody is using fowl/colorful usernames that might offend others. So that i can later remove them if needed.
Now that I have a lot of users, I don't want to parse all 100 pages of usernames so quickly & I would like to add a pause so that I don't bog down my server. Can you help me figure out how to write in a 'pause' to only collect 1 page of user-id's per 20 seconds?? Thanks! (I'm still new to this coding thing! Have no idea how to make pauses etc.)
Right now it just goes through & collects the pages as quickly as they load.......
Here is my 'ParseUsers' function code, it's called from 'button1' which then calls on 'BackgroundWorker1', which calls on the 'ParseUsers' function.
Code:Private Sub ParseUsers() Dim pageSrc As String = GetStuff("http://www.MY-FORUM.com/my-search/index.htm?get_post_detail_form_sub=2&got_it=1&p=1") Dim maxPages As Integer = GetMaxPages(pageSrc) ProgressBar1.Maximum = maxPages Profilelist.AddRange(ExtractUsers(pageSrc)) For i As Integer = 2 To maxPages pageSrc = GetStuff("http://www.MY-FORUM.com/my-search/index.htm?get_post_detail_form_sub=2&got_it=1&p=" & i.ToString) Profilelist.AddRange(ExtractUsers(pageSrc)) ProgressBar1.Value = i Next IO.File.WriteAllLines("USERS.txt", Profilelist.ToArray) End Sub
Any help/suggestions/code would be greatly appreciated :goose: