title: using bulk creation and expire date whois class
body: <p><strong>using bulk whois class</strong></p>
  
  <p>I want to make use of bulk of domain creation, Expire and Registrar where is my mistake here? I am new php programmer</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ERROR | E_WARNING);
  # Change to path of phpwhois folder, wherever it is
  define ("PHP_WHOIS_PATH" , "phpwhois-4.2.2");
  
  include(PHP_WHOIS_PATH . '/whois.main.php');
  
  
   function ez( $domain )
   {
      $whois = new Whois();
      $data = $whois-&gt;Lookup($domain);
      $return['registrar'] = $data['regyinfo']['registrar'];
      $return['expires'] = $data['regrinfo']['domain']['expires'];
      $return['created'] = $data['regrinfo']['domain']['created'];
      return $return;
   }
  
  
   $domain = $_POST['url'];
    if(substr(strtolower($domain), 0, 7) == "http://") $domain = substr($domain, 7); // remove http:// if included
    if(substr(strtolower($domain), 0, 8) == "https://") $domain = substr($domain, 8); // remove https:// if included
    if(substr(strtolower($domain), 0, 4) == "www.") $domain = substr($domain, 4);//remove www from domain
    $domain = rtrim($domain,"/");
  
  $text = ez($domain) ;
  $domainlist = explode ("\n", trim ($text));
  
  
  // Just the expires :
  
  foreach ($domainlist as $line) {
  
          $line = ez(trim($line));
  
  
  echo "Your Domain: " . $_POST['url'];
  echo "&lt;br /&gt;\n";
  echo "Expire Date: ". $text['expires'];
  echo "&lt;br /&gt;\n";
  echo "Registrar: " . $text['registrar'];
  
  echo "&lt;br /&gt;\n";
  echo "Creation Date: " . $text['created'];
  echo "&lt;br /&gt;\n";
  
  }
  ?&gt;
  </code></pre>