title: PHP Script for Whois
body: <p>I create php script for scan domains and know if free or no for register </p>
  
  <pre><code>&lt;?php
  if($_REQUEST['send']=="ok")
  {
  $server="".trim($domain_server_end)."";
  $request="".trim($domain_server_end_request)."";
  
  
  
  $dominio="".$_REQUEST['dominio_nombre']."";
  $dominio_ext="".$_REQUEST['dominio_ext']."";
  $ns = fsockopen($server,43); 
  fputs($ns,"".$dominio.".".$dominio_ext."\r\n");
  $result = '';
  while(!feof($ns)) $result .= fgets($ns,128);
  fclose($ns);
  
  if (eregi($request,$result)) 
  { 
  print'{"domain_register":"ok"}';
  }
  else
  {
  print'{"domain_exists":"ok"}';
  }
  }
  ?&gt;
  
  
  
      &lt;form name="form1" method="post" action="?"&gt;
      Server Whois&lt;br&gt;
      &lt;input type="text" name="$domain_server_end"&gt;&lt;br&gt;
        Server whois request from server : example : No Match , etc
        &lt;input type="hidden" name="send" value="ok"&gt;
        &lt;br&gt;
      &lt;input type="text" name="domain_server_end_request"&gt;&lt;br&gt;
     Domain name&lt;br&gt;
      &lt;input type="text" name="dominio_nombre"&gt;&lt;br&gt;
      Extension Domain without dot&lt;br&gt;
      &lt;input type="text" name="dominio_ext"&gt;
  
        &lt;br&gt;&lt;input type="submit" name="Submit" value="Enviar"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>The problem here it´s with the TLDs , i can´t find whois servers for works the script , i have one for works but i don´t know why now no works , if you can tell me something for works with some TLDs perfect because the script run ok but i can´t find whois servers for use it :(</p>