Skip to content

Tag: html-parsing

split each HTML tag into new line using PHP

I’m going to split each HTML tag into a new line. This is my source: And I’m gonna have it like this: or like this: And this is what I’ve done: and this is the output with put each “>” in a separate line (array member). Answer Instead of using a regex and splitting your source…

Web scraping in PHP

I’m looking for a way to make a small preview of another page from a URL given by the user in PHP. I’d like to retrieve only the title of the page, an image (like the logo of the website) and a bit of text or a description if it’s available. Is there any simple way to do this without