Possible Duplicate:
How to parse and process HTML with PHP?
I want to retrieve the header and footer of a webpage (the owners know this) and display it on a new page so I can add in different content. The page is structured pretty nicely with the content inside a div with an id of content so I figured I could do the following:
Use CURL to retrieve the html Take the html either side of the content Echo it out onto a new page
My problem is I'm not too PHP savvy so I'm not sure how to take the two lumps of html either side. I've used substring in Java before but the substr in PHP seems to work a little differently. Can anyone suggest an alternative?
Thanks