<?php
   // Set target URL
   $url = 'vqz.us';

/*
   // ping for site response
   $ping = shell_exec('ping ' . $url . ' –c 1 –W 3');
   // Ping the URL 1 time and wait no longer than 3 seconds

   $exp = explode("\n", $ping);

   if($exp[4]){
      echo $exp[4];
   }
   else {
      echo $exp[3];
   }
*/


   // Get WHOIS info
/*
   $whois = shell_exec('whois ' . $url);

   $arr = explode("\n", $whois);

   $info = array();

   foreach($arr as $key){
      $exp = explode(':', $key);

      foreach($exp as $key => &$val){
         $val = trim($val);
      }

      $info[$exp[0]] = $exp[1];
   }

   if(array_key_exists('Not found', $info)){
      echo 'Domain non–existant';
   }
   else {
      echo 'Domain exists<br/>';

      print_r($info);
   }
*/
/* EOF */