laravel check domain live or offline code example
Example: how to check if a url is down php
<?php
$url = 'http://google.com';
if(@file_get_contents($url)){
echo "Website is up";
} else {
echo "Website is down";
}
?>
<?php
$url = 'http://google.com';
if(@file_get_contents($url)){
echo "Website is up";
} else {
echo "Website is down";
}
?>