Home All Groups Group Topic Archive Search About

retreiving data from html page

Author
8 Oct 2006 1:36 PM
Jeff
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??

Author
8 Oct 2006 2:26 PM
Evertjan.
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)
Are all your drivers up to date? click for free checkup

Author
8 Oct 2006 2:35 PM
Jeff
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


Show quoteHide quote
"Evertjan." <exjxw.hannivo***@interxnl.net> 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)
Author
8 Oct 2006 2:47 PM
Evertjan.
Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:

Show quoteHide quote
> "Evertjan." <exjxw.hannivo***@interxnl.net> 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)
Author
8 Oct 2006 3:01 PM
Jeff
Show quote Hide quote
"Evertjan." <exjxw.hannivo***@interxnl.net> wrote in message
news:Xns9856AACA9D2ACeejj99@194.109.133.242...
> Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
>
>> "Evertjan." <exjxw.hannivo***@interxnl.net> 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.
Author
8 Oct 2006 3:21 PM
Evertjan.
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[i].replace(/<\/?td>/gi,'')+'<br>';
  return result;
}
</script>

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


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Author
8 Oct 2006 5:26 PM
Jeff
ok. i can see that. so how would you assign different variables??
split them??

Show quoteHide quote
"Evertjan." <exjxw.hannivo***@interxnl.net> 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[i].replace(/<\/?td>/gi,'')+'<br>';
>  return result;
> }
> </script>
>
> =============================
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Author
8 Oct 2006 6:12 PM
Evertjan.
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)
Author
8 Oct 2006 6:40 PM
Mike Brind
"Jeff" <gig_***@adelphia.net> wrote in message
news:Y7mdnQZrXoDKY7XYnZ2dnUVZ_uudnZ2d@adelphia.com...
>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/microsoft.public.inetserver.asp.general/browse_frm/thread/38efdad337d45f3a/f5b444a4a47a1b2d?lnk=gst&q=&rnum=11#f5b444a4a47a1b2d

--
Mike Brind

Bookmark and Share