Travian off-line stats...

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Jul 23, 2008.

  1. Cableguy

    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: Jul 23, 2008
  2. Erel

    Erel Administrator Staff Member Licensed User

    The following code will retrieve the html data (as string):
    Code:
    [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]
     
  3. Cableguy

    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?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can reinitialize the Request object (or Response object) and use it with a different site.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice