We can easily check a given URL or Link is active or not. By using below PHP function we can easily get whether the given URL is active or not active.
<?php
$url='https://timescoding.com/';
$array = get_headers($url);
$string = $array[0];
if(strpos($string,"200"))
{
echo 'URL Exist';
}
else
{
echo 'URL does not exist';
}