Search code examples
phpjqueryweb-scraping

Scrape website to retrieve certain li elements


I'm running a lottery syndicate and want to automate our system to check for the lottery numbers (UK National Lottery)

The url I am getting is: https://www.national-lottery.co.uk/player/p/results/lotto.ftl

and I am using

<?php
$html = file_get_contents("https://www.national-lottery.co.uk/player/p/results/lotto.ftl");
?>

I would like to be able to grab this area of the page, namely the numbers:

enter image description here

The problem is, there is a lot of content on that page and I don't know the first step I would take to break it all down.

Does anyone know a way to do this in PHP or jQuery?

Thanks


Solution

  • what about an existing rss feed http://www.alllotto.co.uk/rss/latest.rss