We are executing below curl call from PHP.
$url = $fullurl;
if (isset($url)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
$headers = curl_getinfo($ch);
curl_close($ch);
$check_url_status = $headers['http_code'];
if ($check_url_status == '200')
$ress = "Link Works";
else
$ress = "Broken Link";
}
What other HTTP status codes should we consider to check if the URL is not a broken /dead link.