Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Problem while retriving info from a webpage (VB6)
Closed Thread
Old 02-11-2005, 08:21 AM   #1 (permalink)
 
Ultra Techie

Join Date: Dec 2004

Location: New Brunswick, Canada

Posts: 511

LegendBreath

Send a message via MSN to LegendBreath
Default Problem while retriving info from a webpage (VB6)

Hi,
I have a litle problem that I can't resolve... my program goes on a website called www.ircspy.com and get results from that page, and after it's display it in a listview. The thing is that one "bot" on the page that have more than one file in my program it only display one file and not the others... here is my code:

PHP Code:
Private Sub Command1_Click()
ListView1.Visible True
ListView1
.ListItems.Clear
Frame2
.Caption "Results"

Dim A As Long
If Check1.Value 1 Then A 1
If Check2.Value 1 Then A 1
If Check3.Value 1 Then A 1
If Check4.Value 1 Then A 1
StatusBar1
.Panels(1).Text "Searching..."
StatusBar1.Panels(2).Text "website 1 / " A

If Check1.Value 1 Then
On Error GoTo TimedOut
RichTmp 
Inet.OpenURL("http://www.ircspy.com/search.asp?searchtext=" Text1.Text)

On Error Resume Next
Dim B 
As Long
Dim C 
As Long
Dim D 
As Long
1
1

RichTmp.Find("Pages (")
Len("Pages (")
RichTmp.SelStart A
RichTmp
.SelLength 1

Dim Page 
As String
Page 
RichTmp.SelText

On Error Resume Next

Do
DoEvents
RichTmp 
Inet.OpenURL("http://www.ircspy.com/search.asp?searchtext=" Text1.Text "&searchtype=&botstatus=1&sortby=Date&db=0&pg=" C)

Do
 
DoEvents

    A 
RichTmp.Find("</select>")

RichTmp.SelStart 0
RichTmp
.SelLength Len("</select>")
RichTmp.SelText ""

RichTmp.Find("</select>")
RichTmp.SelStart 0
RichTmp
.SelLength Len("</select>")
RichTmp.SelText ""

RichTmp.Find("<font color=#008000>")
RichTmp.SelStart 0
RichTmp
.SelLength Len("<font color=#008000>")
RichTmp.SelText ""

RichTmp.Find("</font>")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Bot 
As String
Bot 
RichTmp.SelText
RichTmp
.SelStart 0
RichTmp
.SelLength Len("</font>")
RichTmp.SelText ""

RichTmp.Find("[b]Slots:[/b] ")
RichTmp.SelStart 0
RichTmp
.SelLength Len("[b]Slots:[/b] ")
RichTmp.SelText ""

RichTmp.Find("")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Slots 
As String
Slots 
RichTmp.SelText

RichTmp
.SelStart 0
RichTmp
.SelLength Len("")
RichTmp.SelText ""

RichTmp.Find("[b]Queues:[/b] ")
RichTmp.SelStart 0
RichTmp
.SelLength Len("[b]Queues:[/b] ")
RichTmp.SelText ""

RichTmp.Find("")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Queues 
As String
Queues 
RichTmp.SelText

RichTmp
.SelStart 0
RichTmp
.SelLength Len("")
RichTmp.SelText ""

RichTmp.Find("<a href=")
RichTmp.SelStart 0
RichTmp
.SelLength Len("<a href=")
RichTmp.SelText ""

RichTmp.SelStart 0
RichTmp
.SelLength Len("<a href=") + 1
RichTmp
.SelText ""

RichTmp.Find("irc://")
RichTmp.SelStart 0
RichTmp
.SelLength Len("irc://")
RichTmp.SelText ""

RichTmp.Find("/")
RichTmp.SelStart 0
RichTmp
.SelLength A
Dim Network 
As String
Network 
RichTmp.SelText

RichTmp
.SelLength Len("/")
RichTmp.SelText ""

RichTmp.Find(Chr(34))
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Channel 
As String
Channel 
RichTmp.SelText
RichTmp
.SelStart 0
RichTmp
.SelLength 1
RichTmp
.SelText ""

RichTmp.Find("xdcc send ")
RichTmp.SelStart 0
RichTmp
.SelLength Len("xdcc send ")
RichTmp.SelText ""

RichTmp.Find("');")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Packet 
As String
Packet 
RichTmp.SelText
RichTmp
.SelStart 0
RichTmp
.SelLength Len("');")
RichTmp.SelText ""
RichTmp.Find("<td width=")
RichTmp.SelStart 0
RichTmp
.SelLength Len("<td width=")
RichTmp.SelText ""

RichTmp.Find(">")
RichTmp.SelStart 0
RichTmp
.SelLength Len(">")
RichTmp.SelText ""

RichTmp.Find("<")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Size 
As String
Size 
RichTmp.SelText
RichTmp
.SelStart 0
RichTmp
.SelLength 1
RichTmp
.SelText ""

RichTmp.Find(">")
RichTmp.SelStart 0
RichTmp
.SelLength Len(">")
RichTmp.SelText ""

RichTmp.Find(">")
RichTmp.SelStart 0
RichTmp
.SelLength Len(">")
RichTmp.SelText ""

RichTmp.Find(">")
RichTmp.SelStart 0
RichTmp
.SelLength Len(">")
RichTmp.SelText ""

RichTmp.Find(">")
RichTmp.SelStart 0
RichTmp
.SelLength Len(">")
RichTmp.SelText ""

RichTmp.Find("</td>")
RichTmp.SelStart 0
RichTmp
.SelLength A

Dim Name 
As String
Name 
RichTmp.SelText
RichTmp
.SelStart 0
RichTmp
.SelLength Len("</td>")
RichTmp.SelText ""

Name pReplace(Name"</SPAN>""")
Name pReplace(Name"<SPAN CLASS='HIGHLIGHT'>""")

If 
Name <> "" Then
If Size <> "" Then
ListView1
.ListItems.Add , , Name
ListView1
.ListItems.Item(B).ListSubItems.Add , , Size
ListView1
.ListItems.Item(B).ListSubItems.Add , , "XDCC (IRC)"
ListView1.ListItems.Item(B).ListSubItems.Add , , Network
ListView1
.ListItems.Item(B).ListSubItems.Add , , Channel
ListView1
.ListItems.Item(B).ListSubItems.Add , , Bot
ListView1
.ListItems.Item(B).ListSubItems.Add , , Packet
ListView1
.ListItems.Item(B).ListSubItems.Add , , Slots
ListView1
.ListItems.Item(B).ListSubItems.Add , , Queues
End 
If
End If

    
1

    
    Frame2
.Caption "Results : " ListView1.ListItems.Count " founded!"
    
Loop Until Name ""

    
ListView1.ListItems.Count 1
    C 
1
    
Loop Until C 
Page 1

0

If Check1.Value 1 Then A 1
If Check2.Value 1 Then A 1
If Check3.Value 1 Then A 1
If Check4.Value 1 Then A 1
StatusBar1
.Panels(1).Text "Searching..."
StatusBar1.Panels(2).Text "website 2 / " A

End 
If

Exit 
Sub
TimedOut
:
MsgBox ("The " StatusBar1.Panels(2).Text " has timeout!")
End Sub 
Can someone help me?
__________________
LegendBreath is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On