How to crawl markup with PHP, check if images exists and replace non-existing paths?
<p>I have some markup which I need to crawl for images, and check if the images exists in the paths they have specified. If an image does not exists in location A, the path should be replaced with location B.</p>

<p>I'm wondering what would be the most efficient way of achieving this?</p>
