Results 1 to 10 of 10

Thread: How to get info from a website?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    20

    How to get info from a website?

    im in this game called outwar.and i was wondering if someone could help me code a windows application in C# that can sort the 10 ppl with most money out..

    please help me.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: How to get info from a website?

    Sure. Use Sockets to connect to the remote server, then send an HTTP GET request to retrieve the page you want by supplying a relative URI, then parse the returned data stream using the same socket. Store the page in a string (or whatever) then use regular expressions to extract the relevant information from the raw HTML.

    Any questions?
    I don't live here any more.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to get info from a website?

    You could also use HttpWebRequest to perform the Get/Post.

    Although, how is it more efficient to open up an application to check the scores when you could just login to the website and check it?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    20

    Re: How to get info from a website?

    Quote Originally Posted by mendhak
    You could also use HttpWebRequest to perform the Get/Post.

    Although, how is it more efficient to open up an application to check the scores when you could just login to the website and check it?

    I need a program that can sort the ppl with most money out..

    can anyone help code it or code it to me`?

    please contact me

  5. #5
    Hyperactive Member francisstokes's Avatar
    Join Date
    May 2005
    Location
    Kent, England
    Posts
    272

    Re: How to get info from a website?

    Wossname told you how to do it. Try researching all the things you didn't understand in his post.

  6. #6
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: How to get info from a website?

    or if you want someone to code it for you - there will be a price as well

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to get info from a website?


  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    20

    Re: How to get info from a website?

    I just need like more instructions..i dont want it coded by someone else,then i dont learn it(and whats the point then:P)

    but if anyone could like give me some more instructions?

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    20

    Re: How to get info from a website?

    this is an example from the "how do I"

    // Synchronous connect using IPAddress to resolve the
    // host name.
    public static void Connect(string host, int port)
    {
    IPAddress[] IPs = Dns.GetHostAddresses(host);

    Socket s = new Socket(AddressFamily.InterNetwork,
    SocketType.Stream,
    ProtocolType.Tcp);

    Console.WriteLine("Establishing Connection to {0}", host);
    s.Connect(IPs[0], port);
    Console.WriteLine("Connection established");
    }

    how can i get it to work,lol

    i get errors all the time..

    please help

  10. #10
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: How to get info from a website?

    what errors? be specific

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width