title: check if image exists php
body: <p>I am in the middle of coding up a property portal. I am stuck on checking images. I know how to check if an image url is set. But the problem is detecting if there is actually a valid image at the url.</p>
  
  <p>example : <a href="http://property.images.themovechannel.com/cache/7217/6094437/img_main.jpg" rel="noreferrer">http://property.images.themovechannel.com/cache/7217/6094437/img_main.jpg</a></p>
  
  <p>This image url exists but the image is has now been removed so it just displays blank in my propety search page. Is there a way of checking there is an image there at the url  and then displaying a placeholder if it doesnt exist.</p>
  
  <p>something like  </p>
  
  <pre><code>$imageURL = "http://property.images.themovechannel.com/cache/7217/6094437/img_main.jpg";
  
  if (exists($imageURL)) { display image } 
  else { display placeholder }
  </code></pre>
  
  <p>But all this does is check the url exists, which it does there is just no image there</p>
  
  <p>Thanks in advance</p>