Menu
Hello
I’m trying to get website results and check if it is down or up
I have this code it works fine and shows the result when enter google.com but with facebook.com it shows nothing
“`
if(!isset($_GET[‘url’]))
die(“enter url”);
$ch = curl_init($_GET[‘url’]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
if(curl_exec($ch))
{
$info = curl_getinfo($ch);
// echo ‘Took ‘ . $info[‘total_time’] . ‘ seconds to transfer a request to ‘ . $info[‘url’];
echo “<pre>” ;
print_r($info);
echo “<pre>”;
}
curl_close($ch);