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

PHP
2

how to check if a url is up 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

Browse Popular Code Answers by Language