retreiving data from html page

Discussion in 'ASP General' started by Jeff, Oct 8, 2006.

  1. Jeff

    Jeff Guest

    I asked this question sometime ago. some help was given, but A.) i didn't
    understand the help and B.) I can't find the post.

    i am looking for a way to take a table of stats on an HTML page, and turn
    the data into variables, and upload to a DB using ASP.

    say if a page contained stats from a golf tournament, i would be able to
    pull the data and insert it into a db table on MY server.

    can someone help me with this??
     
    Jeff, Oct 8, 2006
    #1
    1. Advertising

  2. Jeff

    Evertjan. Guest

    Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:

    > I asked this question sometime ago. some help was given, but A.) i
    > didn't understand the help and B.) I can't find the post.
    >
    > i am looking for a way to take a table of stats on an HTML page, and
    > turn the data into variables, and upload to a DB using ASP.
    >
    > say if a page contained stats from a golf tournament, i would be able
    > to pull the data and insert it into a db table on MY server.
    >
    > can someone help me with this??


    If the data are on your html page, you have put them there somehow, and you
    should be able to get them from your source.

    If the data ia from another man's page, you will have to do some
    datamining:

    <http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-
    remote-web-page.html>

    and parse the resulting string for your data.



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 8, 2006
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    yes, the page is NOT on my server.
    this is where i get confused.
    here is a page of some stats from MY server just to use as example.

    http://www.gig-gamers.com/GIG/IHT_standings.asp

    so let's say this was not on my server, but i wanted to get the data.

    for the first name, MrNuddles, how would i pull those stats out for him.
    meaning each round score and the totals. even the simple stuff like what the
    field names or variables would be.

    is there a dummy version of this??..lol


    "Evertjan." <> wrote in message
    news:Xns9856A72C5DF75eejj99@194.109.133.242...
    > Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
    >
    >> I asked this question sometime ago. some help was given, but A.) i
    >> didn't understand the help and B.) I can't find the post.
    >>
    >> i am looking for a way to take a table of stats on an HTML page, and
    >> turn the data into variables, and upload to a DB using ASP.
    >>
    >> say if a page contained stats from a golf tournament, i would be able
    >> to pull the data and insert it into a db table on MY server.
    >>
    >> can someone help me with this??

    >
    > If the data are on your html page, you have put them there somehow, and
    > you
    > should be able to get them from your source.
    >
    > If the data ia from another man's page, you will have to do some
    > datamining:
    >
    > <http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-
    > remote-web-page.html>
    >
    > and parse the resulting string for your data.
    >
    >
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
     
    Jeff, Oct 8, 2006
    #3
  4. Jeff

    Evertjan. Guest

    Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:

    > "Evertjan." <> wrote in message
    > news:Xns9856A72C5DF75eejj99@194.109.133.242...
    >> Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
    >>
    >>> I asked this question sometime ago. some help was given, but A.) i
    >>> didn't understand the help and B.) I can't find the post.
    >>>
    >>> i am looking for a way to take a table of stats on an HTML page, and
    >>> turn the data into variables, and upload to a DB using ASP.
    >>>
    >>> say if a page contained stats from a golf tournament, i would be
    >>> able to pull the data and insert it into a db table on MY server.
    >>>
    >>> can someone help me with this??

    >>
    >> If the data are on your html page, you have put them there somehow,
    >> and you
    >> should be able to get them from your source.
    >>
    >> If the data ia from another man's page, you will have to do some
    >> datamining:
    >>
    >> <http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-
    >> remote-web-page.html>
    >>
    >> and parse the resulting string for your data.


    [Please do not toppost on usenet]

    > yes, the page is NOT on my server.
    > this is where i get confused.


    Don't be confused, but

    1 read the above(!) link.
    2 look thouroughly at the view source of the page in question,
    3 go parse that page's html string ftom 1) with functions like
    split() match()replase() and Regex.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 8, 2006
    #4
  5. Jeff

    Jeff Guest

    "Evertjan." <> wrote in message
    news:Xns9856AACA9D2ACeejj99@194.109.133.242...
    > Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
    >
    >> "Evertjan." <> wrote in message
    >> news:Xns9856A72C5DF75eejj99@194.109.133.242...
    >>> Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
    >>>
    >>>> I asked this question sometime ago. some help was given, but A.) i
    >>>> didn't understand the help and B.) I can't find the post.
    >>>>
    >>>> i am looking for a way to take a table of stats on an HTML page, and
    >>>> turn the data into variables, and upload to a DB using ASP.
    >>>>
    >>>> say if a page contained stats from a golf tournament, i would be
    >>>> able to pull the data and insert it into a db table on MY server.
    >>>>
    >>>> can someone help me with this??
    >>>
    >>> If the data are on your html page, you have put them there somehow,
    >>> and you
    >>> should be able to get them from your source.
    >>>
    >>> If the data ia from another man's page, you will have to do some
    >>> datamining:
    >>>
    >>> <http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-
    >>> remote-web-page.html>
    >>>
    >>> and parse the resulting string for your data.

    >
    > [Please do not toppost on usenet]
    >
    >> yes, the page is NOT on my server.
    >> this is where i get confused.

    >
    > Don't be confused, but
    >
    > 1 read the above(!) link.
    > 2 look thouroughly at the view source of the page in question,
    > 3 go parse that page's html string ftom 1) with functions like
    > split() match()replase() and Regex.
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)


    guess it is time to learn more asp and stuff.

    i read the page, and all the examples, and this still seems greek to me.
    if i could see maybe one example of how a variable is derived from the html
    text, it may make more sense.
     
    Jeff, Oct 8, 2006
    #5
  6. Jeff

    Evertjan. Guest

    Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:

    >> Don't be confused, but
    >>
    >> 1 read the above(!) link.
    >> 2 look thouroughly at the view source of the page in question,
    >> 3 go parse that page's html string ftom 1) with functions like
    >> split() match()replase() and Regex.

    >
    > guess it is time to learn more asp and stuff.
    >
    > i read the page, and all the examples, and this still seems greek to
    > me. if i could see maybe one example of how a variable is derived from
    > the html text, it may make more sense.


    ========== test.asp =========

    <% ' vbscript
    html = "<html><body><table><tr>"&_
    "<td>data 12</td><td>13 data</td><tr>"&_
    "<td>testing</td><td>Foo</td><tr>"&_
    "</table></body></html>"
    response.write parseMe(html)
    %>

    <script language='javascript' runat='server'>
    function parseMe(t){
    var result='';
    data = t.match(/<td>[^<]+<\/td>/gi);
    for (var i=0;i<data.length;i++)
    result += i+': '+data.replace(/<\/?td>/gi,'')+'<br>';
    return result;
    }
    </script>

    =============================


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 8, 2006
    #6
  7. Jeff

    Jeff Guest

    ok. i can see that. so how would you assign different variables??
    split them??

    "Evertjan." <> wrote in message
    news:Xns9856B0A4432A7eejj99@194.109.133.242...
    > Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
    >
    >>> Don't be confused, but
    >>>
    >>> 1 read the above(!) link.
    >>> 2 look thouroughly at the view source of the page in question,
    >>> 3 go parse that page's html string ftom 1) with functions like
    >>> split() match()replase() and Regex.

    >>
    >> guess it is time to learn more asp and stuff.
    >>
    >> i read the page, and all the examples, and this still seems greek to
    >> me. if i could see maybe one example of how a variable is derived from
    >> the html text, it may make more sense.

    >
    > ========== test.asp =========
    >
    > <% ' vbscript
    > html = "<html><body><table><tr>"&_
    > "<td>data 12</td><td>13 data</td><tr>"&_
    > "<td>testing</td><td>Foo</td><tr>"&_
    > "</table></body></html>"
    > response.write parseMe(html)
    > %>
    >
    > <script language='javascript' runat='server'>
    > function parseMe(t){
    > var result='';
    > data = t.match(/<td>[^<]+<\/td>/gi);
    > for (var i=0;i<data.length;i++)
    > result += i+': '+data.replace(/<\/?td>/gi,'')+'<br>';
    > return result;
    > }
    > </script>
    >
    > =============================
    >
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
     
    Jeff, Oct 8, 2006
    #7
  8. Jeff

    Evertjan. Guest

    Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:

    > ok. i can see that. so how would you assign different variables??
    > split them??
    >


    [Please do not toppost on usenet]

    In my example, the <td> contents are numbered.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 8, 2006
    #8
  9. Jeff

    Mike Brind Guest

    "Jeff" <> wrote in message
    news:...
    >I asked this question sometime ago. some help was given, but A.) i didn't
    >understand the help and B.) I can't find the post.
    >
    > i am looking for a way to take a table of stats on an HTML page, and turn
    > the data into variables, and upload to a DB using ASP.
    >
    > say if a page contained stats from a golf tournament, i would be able to
    > pull the data and insert it into a db table on MY server.
    >
    > can someone help me with this??


    Here's your original post with the answers. Note, the thread wasn't started
    by you.

    http://groups.google.com/group/micr...4a47a1b2d?lnk=gst&q=&rnum=11#f5b444a4a47a1b2d

    --
    Mike Brind
     
    Mike Brind, Oct 8, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,116
    Artur-ek
    May 23, 2005
  2. Marty Gagnon
    Replies:
    1
    Views:
    427
    Martin Honnen
    Nov 30, 2004
  3. ElCapitan
    Replies:
    0
    Views:
    138
    ElCapitan
    Mar 14, 2006
  4. Jens

    Problem retreiving data from Soap message

    Jens, Jul 23, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    162
  5. Replies:
    1
    Views:
    158
    Anthony Jones
    Sep 28, 2007
Loading...

Share This Page