title: check if the image link is valid or not with php
body: <p>I have huge list of 45000+ image links in my database.
  I need to test which of do not point to a image file (broken).</p>
  
  <p>I have tried file_exists, cURL, header etc.
  but all returned same result for both url (which has file and which dosen't)</p>
  
  <p>here are the two links to test</p>
  
  <p><a href="http://visualez.com/uploadtile/tiles/combined/Grey%20serpegenti_307_140_NaturalGlossy_Ceratec%20Marble.jpg" rel="nofollow noreferrer">link1(correct)</a></p>
  
  <p><a href="http://visualez.com/uploadtile/tiles/combined/Grey%20serpegenti_307_140_2NaturalGlossy_Ceratec%20Marble.jpg" rel="nofollow noreferrer">link2(broken)</a></p>
  
  <p>i need a php script to different all the links into broken or correct.</p>
  
  <p>thanks... please help me.</p>