I want to get a table from other website (the table is being updated daily) and I want it to be shown in my website just not in the same arrangement as it has in the original website.
So I got the table using curl and strstr() but edit the whole table using string functions just seems pointless. I’m sure there is a much easier way doing this.
Maybe there is a way to create the original table in xml format that I’ll be able to play with the structure more easily?
Thank you very much!
Here’s a crude example of how you might consume the table (only to echo out another table), Below I’m using SimpleXML and xpath to search the document for the element that has a class of Table Data and looping through all the TR’s and putting some special conditions to deal with the and blocks that exist
Obvious downside is if the third party website’s layout changes, your code will stop functioning.