Travian off-line stats...

Cableguy

Expert
Licensed User
Hi, I've been planning to do some play with the html dll but being honnest, I don't known even were to start...
Hopefully there are here a few Travian player that can share my interest and have the suficient knoleage to get "us" started...

Assuming that the login phase is already passed, How do i query the web page and how does the data returns?
the page i wich to query is :Travian brx
Any small example?
 
Last edited:

Erel

Administrator
Staff member
Licensed User
The following code will retrieve the html data (as string):
B4X:
[LEFT][FONT=Courier New][COLOR=#0000ff]Sub [/COLOR][/FONT][FONT=Courier New]App_Start[/FONT]
[FONT=Courier New]      Form1.Show[/FONT]
[FONT=Courier New]      URL =  "http://speed.travian.com.br/dorf1.php"[/FONT]
[FONT=Courier New]      TextBox1.Text = GetText(URL) [/FONT][FONT=Courier New][COLOR=#008000]'TextBox1 is a multiline textbox.[/COLOR][/FONT]
[FONT=Courier New][COLOR=#0000ff]End[/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff] Sub[/COLOR][/FONT]

[FONT=Courier New][COLOR=#0000ff]Sub[/COLOR][/FONT][FONT=Courier New] GetText (URL)[/FONT]
[FONT=Courier New]      Response.New1[/FONT]
[FONT=Courier New]      Request.New1(URL)[/FONT]
[FONT=Courier New]      Response.Value = Request.GetResponse [/FONT][FONT=Courier New][COLOR=#008000]'This line calls the server  and gets the response.[/COLOR][/FONT]
[FONT=Courier New]      string = Response.GetString [/FONT][FONT=Courier New][COLOR=#008000]'Get the Response string.[/COLOR][/FONT]
[FONT=Courier New]      Response.Close[/FONT]
[FONT=Courier New][COLOR=#0000ff]return[/COLOR][/FONT][FONT=Courier New] string[/FONT][/LEFT]
[FONT=Courier New][COLOR=#0000ff]End [/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff]Sub
[/COLOR][/FONT]
 

Cableguy

Expert
Licensed User
I'm learnig alot aout retrieving info from a web page...
But now I have a doubt...
How to work with a hole web site...
imagine that i retrive some info from one page and wich to use that info on ANOTHER page, do i have to create a diferent response object?
 
Top