[RESOLVED] How do i gather a list of myspace friend ids?
ok im building a program that will allow me to get a list of myspace friend ids from anypage using the webbrowser control what i need is to know how to get the user ids from any page like say if i goto the online friends page i want to extract all friend ids from that page and put them into a listbox
for example say i click the view all friends link within my program it will take me to my friends list in myspace i want all my friends friend id's in a listbox
any help would be great and ill give you credit for assisting in the program it self
The first thing you need to do is read the HTML and see how mySpace encodes the information within the web page. After that, just parse the content and extract the individual IDs. I don't think you'll get a more specific answer than that, as your question is very domain-dependant.
ok but how do i get the strings? and it has the same friend id in there a few times do i have to get the program to read the page source or is there another way around it? like do i have to get the page source put it into a rich textbox then do the find next thing like in the view source page that comes with internet explorer?
is there anyway you could give me an example of how to get it out of the richtextbox? i am so stuck im sorry but as you can tell i been trying this all day long im getting frustrated im not an expert but when i get that done ill be able to finish my application and its killing me i hate to even ask for help
If what you have in your richtextbox looks like what you showed in post #3 then just do
Code:
Const QUOTE = """"
Dim lngEnd As Long
Dim lngStart As Long
lngStart = -1
Do Until lngStart = 0
lngStart = InStrRev(DataFrm.Rich1.Text , "friendid=" & QUOTE, lngEnd - 1)
If lngStart > 0 Then
lngEnd = InStr(lngStart + 9, DataFrm.Rich1.Text , QUOTE)
Debug.Print Mid$(DataFrm.Rich1.Text, lngStart + 10, lngEnd - lngStart)
End If
Loop
ok that works thanks only thing is it puts it in twice and how do i change the length to match the length of the friendid?
for example
if theres a friendid thats 10 characters long then make it add 10 but if the next one is 15 then make it add 15? could i do that with dim i as integer then add i where the 9 and 10 are?
omg it works!!!!!! thank you so much man you have no idea whats your name and website (if you have a site) ill give you credit for the help you provided in my app you have helped so much man i cant thank you enough