how to check if a url is up php
snippet in php

how to check if a url is up php

user4613

<?php
$url = 'http://google.com';

if(@file_get_contents($url)){
	
	echo "Website is up";
	
} else {
	
	echo "Website is down";
	
}

?>