|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
retreiving data from html pageI 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 wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
> I asked this question sometime ago. some help was given, but A.) i If the data are on your html page, you have put them there somehow, and you > 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?? 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) 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) Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
Show quoteHide quote > "Evertjan." <exjxw.hannivo***@interxnl.net> wrote in message [Please do not toppost on usenet]> 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. > yes, the page is NOT on my server. Don't be confused, but > this is where i get confused. 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)
Show quote
Hide quote
"Evertjan." <exjxw.hannivo***@interxnl.net> wrote in message guess it is time to learn more asp and stuff.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) 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 wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
>> Don't be confused, but ========== test.asp =========>> >> 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. <% ' 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) 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) Jeff wrote on 08 okt 2006 in microsoft.public.inetserver.asp.general:
> ok. i can see that. so how would you assign different variables?? [Please do not toppost on usenet]> split them?? > In my example, the <td> contents are numbered. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) "Jeff" <gig_***@adelphia.net> wrote in message Here's your original post with the answers. Note, the thread wasn't started 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?? 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
Other interesting topics
Quizz script performance bug -- too many questions?
interesting problem... call store procedure for inserting data in asp Problem with asp page returning a jpg image... Export data to Excel How to collect uncertain number of people information in a form SMTP how can i detect multiplt VBNewLine's in a row Random GUID type number or RegExp Jet Database Error |
|||||||||||||||||||||||