Skip to content
Advertisement

Tag: html-parsing

Grabbing specific elements inside DIV from external page

I need to scrap the following elements inside each one of these div’s class=”product-grid-item” (page contains several of them), but in fact I have no clue how to do it… so, I need help not to pull my hair out. 1 – The link and image inside the div: class=”product-element-top2; <a href=”https://…this_link” class=”product-image-link”> (just need the link) <img width=”300″ height=”300″

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 into an array, you

scraping using PHP Simple HTML DOM Parser

I want to use PHP simple HTML DOM parser to scrape from a website. Source code is so random like that : Instead of putting directly “Details. (Lob., Co v.)” inside < p> < /p> , it’s put using < font> and < i>. When I use this code I find “Details. (Lob.,” it stops when finding < i >

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

Advertisement