Answers for "how to check if a url is down php"

PHP
2

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";
	
}

?>
Posted by: Guest on May-31-2020

Code answers related to "how to check if a url is down php"

Browse Popular Code Answers by Language