try checking the URLs like this :
$ch = curl_init($url); //<=== YOUR URL
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// if $retcode >= 400 -> not found else if $retcode = 200, found.
curl_close($ch);