Iam trying to build a PHP function to check if some URLs are still working or have expired.
Would be great if someone can help me creating the loop functionality ("define URL" should loop through the list and "output" should write back the echo into the table).
Here is the php
$sql = "SELECT link FROM link_check";
$url = $conn->query($sql);
foreach ($sql as $url);
{
$check_url_status = check_url($url);
if ($check_url_status == '200')
echo "Link Works";
else
echo "Broken Link";
}
?>
This question is related to this old post: Check Link URL