How to grab specific data from site

Hello there, I’m trying to get data from another website using php.

I’ve been using explode to grab the info that i want before, but now the website has updated its layout and so on. It doesen’t work any more

<div class="area-content"><span class="total">+564 idag</span><span class="count">10%</span><h3>6129</h3><p>Fall</p></div>

this is the string on the site and I want to grab the h3 numbers, there are total of 3 h3 on the website. how to do this?

look into php data scraping. you can find php scraping libraries that are easy to use from github and some examples online as well. goodluck.

that’s a good opportunity to try out regex, as it’s a simple example.

Sponsor our Newsletter | Privacy Policy | Terms of Service