How to extract a table row from a web page
Posted: Thu Jul 22, 2010 4:53 pm
I'd guess this has been asked/answered before, but I couldn't find anything, so...
I want to read a web page into my PHP script, and then in that script be able to "query" the page to pull a specific row from a specific table.
For example, I'd like to read this row's elements into an array:
12.500 .WIN\10K20\12.5 0.150 +0.02 +15.38% 0.160 0.120 0.160 19 5,363
and the original table can be found here: http://moneycentral.msn.com/investor/op ... &Year=2010
Any suggestions on the best way to do this?
I've looked at the snoopy class, but haven't been able to get it to work. I could be doing something wrong with the class, or it maybe just isn't the right tool for the job. ?? http://sourceforge.net/projects/snoopy/
The key here is I want to be able to "query" the page to find a specific row.
Thanks for any constructive input!
AT
I want to read a web page into my PHP script, and then in that script be able to "query" the page to pull a specific row from a specific table.
For example, I'd like to read this row's elements into an array:
12.500 .WIN\10K20\12.5 0.150 +0.02 +15.38% 0.160 0.120 0.160 19 5,363
and the original table can be found here: http://moneycentral.msn.com/investor/op ... &Year=2010
Any suggestions on the best way to do this?
I've looked at the snoopy class, but haven't been able to get it to work. I could be doing something wrong with the class, or it maybe just isn't the right tool for the job. ?? http://sourceforge.net/projects/snoopy/
The key here is I want to be able to "query" the page to find a specific row.
Thanks for any constructive input!
AT