[RESOLVED] Get numbers of player.....
ok here is my problem there is a webpage (gaming site) and i want to get how many players are playing the game right now it says right on the page but i cant seems to find a code that specificly finds the numbers of players ok if u go to
you will see on there main page it says all the game names and under them tells how many players playing that game so i have tired the split command in vb that doesnt work.....tried the search thing that doesnt work... any 1 here help me with code? plz... all i want is to get number of players of a game and show that in msgbox.... see picture below if u didnt under stand what i am saying :D
http://img107.imageshack.us/img107/6...board02uu8.jpg
thx in advance
Re: Get numbers of player.....
Read the source code for that then split it by using <strong> as your delimiter. If the count is constant you could easily get the value.
Re: Get numbers of player.....
there more then 1 strong.... it gives me error when i try to do that
Re: Get numbers of player.....
I know. So you'll have to make a condition to that. I counted it and there's only 5 of them and the one you're looking for is second to the last.
so you will less 1 from the upper bound of the array or simply put assuming its a constant value.
yourArray(3) << there is your value
You need to include Instr() and some Mid$() to trim the strings.
Re: Get numbers of player.....
wow >__< soo confused lol can u narrow it down for me? or provide some code?
1 Attachment(s)
Re: Get numbers of player.....
This is a quick example.
Code:
Private Sub Command1_Click()
Dim ff As Integer
Dim myArr() As String
ff = FreeFile
Open "c:\www.ijji[1].txt" For Input As ff
myArr = Split(Input(LOF(ff), ff), "<strong>")
MsgBox Mid$(myArr(4), 1, 2) ' assuming the number of players are 2 digits only.
Close ff
End Sub
I've attached the sample source from the website. I am in a rush buddy. You'll figure it out by yourself. :)
Re: Get numbers of player.....
thx alot man help me alot!