I need one function written in PHP which should do following:
- Remove all link buttons from blog html page source which appear on the left, right, top and bottom of the page
- Remove everything which exist on the left, right, top and bottom of the page. Only keep main (center) contents of the page. It can include text, pictures, videos. Remove any link or menu buttons if it exist in the center of the page
I already stored html source in a table. You need to fetch html from table and make it clean from all irrelevant(footer and header links, menu links, side bar links etc) stuff. There are different kinds of blogs, your provided solution should work for all kinds of blogs. If you want to use any tool which extract only relevant contents from a web page that's also fine but then it should work on our linux hosted server.