function check_url($url) {
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_HEADER,TRUE); // get the header
curl_setopt($c, CURLOPT_NOBODY,TRUE); // and *only* get the header
if (!curl_exec($c)) { return false; }
$httpcode = curl_getinfo($c, CURLINFO_HTTP_CODE);
return ($httpcode < 400);
}böle yaptım ama olmadı