I realize this isn't much for code, but I haven't gotten anywhere with tutorials I found on the net. The table's class is "data standings league".
Basically, I want to grab the data in the NHL.com standings for the league. Then I'd like to put that info into my own MySQL table. Ideally, I'd like to automate this process everyday (although this can wait).
Any help is appreciated!
Last edited by jsquadrilla; 11-16-2011 at 05:01 PM..
Then you need to var_dump() the result and see what the array contains. The function is probably returning several things in an array including the information you want.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
wow ... that is going to be a tough one.
I know you want to do this for free, but find out how much it would
cost to get an account with them, and possible ... they may have an
API or XML file that contains the data. Even if it costs some money
each month, it might be worth it. At least ask them about it.
Parsing their HTML is not going to be easy, but technically, it could be
done with enough scripting and enough time to debug it.
Then you need to var_dump() the result and see what the array contains. The function is probably returning several things in an array including the information you want.
Now it says "array(0) { } Array"
Quote:
Originally Posted by mlseim
wow ... that is going to be a tough one.
I know you want to do this for free, but find out how much it would
cost to get an account with them, and possible ... they may have an
API or XML file that contains the data. Even if it costs some money
each month, it might be worth it. At least ask them about it.
Parsing their HTML is not going to be easy, but technically, it could be
done with enough scripting and enough time to debug it.
.
Can't be that hard? I mean, I know barely nothing about scraping, but if the data is constant (table name stays the same etc.) it shouldn't be too difficult to figure out. Sadly, Google Docs does exactly what I want with the "importhtml" function. It puts it in a spreadsheet perfectly, so there has to be a way (if only I knew how importhtml functioned...)
When I run this, I get the exact page, but on my URL which is perfect. Now I just need to find a way to extract what I need from this page, which is the next step and where I'm completely lost.
When I run this, I get the exact page, but on my URL which is perfect. Now I just need to find a way to extract what I need from this page, which is the next step and where I'm completely lost.
It displays the table, but still has href's, classes etc. I want to strip it all and just have the data. Just looking for a kick in the right direction for how to do that.
Last edited by jsquadrilla; 11-16-2011 at 08:22 PM..