I would like to write some PHP code to parse some HTML to return the href and title of all of the images in the "image_url" a class. I am currently using substr to find the location of the strings, however the webpage sometimes changes content and I can't always rely on substr. Is there a DOM way or some other regular expression way I can find these elements within my HTML?
<a class="image_url" href="/123.jpg" target="_blank"><img src="/123.jpg" border="0" title="Some dynamic length image title that is making this difficult for me"></a>