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 actual
function exists($uri) { $ch = curl_init($uri); curl_setopt($ch, CURLOPT_NOBODY, true); curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return $code == 200; }