I want to make a program that can log into bungie.net and displays your stats and what not. Would it be possible to sign into a .net site and get information from it? How would I go about start it?
Printable View
I want to make a program that can log into bungie.net and displays your stats and what not. Would it be possible to sign into a .net site and get information from it? How would I go about start it?
i think that if u know where to look specifically then you can use MSINET.OCX to look through source code.
u can say something like
VB Code:
Dim SourceCode As String SourceCode=Inet1.OpenURL("http://www.bungie.net")
Note: You need to select "Microsoft Internet Transfer Control" from the components tab.
Ok how would I go about letting the user log in through my program and not having to view the site?
well i think u can say(if u know where to login exactly- didn't look carefully and i couldn't find where to login) :
then u'll have the source code in the string variable called Source.Then u can use Mid and Instr functions to find specific info.VB Code:
Dim Source As String, Username As String, Password As String Private Sub Command1_Click() Username= Text1.Text Password= Text2.Text Source=Inet1.OpenURL("http://www.bungie.net/stats/whatever.aspx?username=" & chr(34) & Username & chr(34) & "&password=" & chr(34) & Password & chr(34) ) End Sub
i'm not quite sure if it works, but it worths giving a try.
oh, and OpenURL doesn't display the page itself it just opens the source code.
And if u need help finding the specific part, i've got a function that reads the given part between two string values, i can send it here.
kewl thanks, it seems to have logged me in. I do have another issue tho lol. to get to the stats the user needs to click a button on the site...how could i do that here? if I opened that other page with the inet1 would it stay logged in?
is it that ".NET" sign in button?
yes it is
i didn't quite get the question but i think u can do omething like:
VB Code:
Private Sub Command1_Click() Text1.Text = Inet1.OpenURL("http://login.passport.net/uilogin.srf?id=42917&login=" & Chr(34) & Text2.Text & Chr(34) & "&passwd=" & Chr(34) & Text2.Text & Chr(34)) End Sub
and here is the function i mentioned:
VB Code:
Private Function Between(Begining As String, Ending As String, TextToLookIn As String) As String Dim Be As String, En As String, TTLI As String Be = Begining En = Ending TTLI = TextToLookIn TTLI = Right(TTLI, Len(TTLI) - (InStr(1, TTLI, Be) + Len(Be) - 1)) Between = Left(TTLI, InStr(1, TTLI, En) - 1) End Function
when u use the first code above, it redirects u to Halo page automatically so u dont need to stay connected.
if u need any further help please mail me, i've gotta go to bed now it's GMT+2 here which makes 00.14
my mail: [email protected]