Foros del Web » Programando para Internet » PHP »

Necesito ayuda para instalar un buscador de nombres de dominio

Estas en el tema de Necesito ayuda para instalar un buscador de nombres de dominio en el foro de PHP en Foros del Web. Hola, necesito ayuda para instalar un buscador de nombres de dominio, he bajado un whois.php, alguien me puede decir como incluirlo en un formulario e ...
  #1 (permalink)  
Antiguo 07/02/2004, 21:59
 
Fecha de Ingreso: febrero-2004
Mensajes: 3
Antigüedad: 20 años, 2 meses
Puntos: 0
Necesito ayuda para instalar un buscador de nombres de dominio

Hola, necesito ayuda para instalar un buscador de nombres de dominio, he bajado un whois.php, alguien me puede decir como incluirlo en un formulario e instalarlo en mi servidor.

Gracias
  #2 (permalink)  
Antiguo 07/02/2004, 22:41
Avatar de ||Dj||  
Fecha de Ingreso: enero-2002
Mensajes: 2.349
Antigüedad: 22 años, 3 meses
Puntos: 1
Si queres que los datos del form sean procesados por ese archivo tenes que incluirlo en el action..

ej:

<form name="formulario" method="post" action="whois.php">

pero obviamente deben concordar los nombres de los campos y todo eso, por ahi es autoporcesable y el form ya está incluido en ese archivo php, si lo pegas aca por ahi alguien te puede orientar un poco mejor.
Salu2.
  #3 (permalink)  
Antiguo 08/02/2004, 08:25
 
Fecha de Ingreso: febrero-2004
Mensajes: 3
Antigüedad: 20 años, 2 meses
Puntos: 0
Gracias por la respuesta, lo he incluido en el formulario, pero no funciona, alguien me puede echar una mano? este es el formulario:

<FORM action="clsWhois.php" method=post>
<TABLE border=0 align="center">
<TBODY>
<TR>
<TD>
<TABLE border=1>
<TBODY>
<TR>
<TD>
<TABLE border=0 cellPadding=3>
<TBODY>
<TR>
<TD colSpan=3 vAlign=top><FONT face=ARIAL size=-1>NOMBRE DE DOMINIO:</FONT></TD></TR>
<TR>
<TD vAlign=center><INPUT maxLength=57 name=domain></TD>
<TD align=middle vAlign=center><FONT size=+3>.</FONT></TD>
<TD align=left>
<FONT face=ARIAL><select name="ext">
<option>com
<option>net
<option>org
</select>
</FONT></TD></TR>
<TR>
<TD align=middle colSpan=3><INPUT type=submit value="Comprobar Nombre"> <INPUT type=reset value=Borrar>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM>
-----------------------------------------------------------------------------

Este es el clsWhois.php

<?
/*
************************************************** **********************
* © Sloppycode.net All rights reserved.
*
* This is a standard copyright header for all source code appearing
* at sloppycode.net. This application/class/script may be redistributed,
* as long as the above copyright remains intact.
* Comments to [email protected]
************************************************** **********************
*/

/*
* Whois wrapper for most global TLDs
* @author C.Small <[email protected]>
* @version 1.5 - Added PEAR style comments
* @version 1.4 - Timeout and whois_server properties added.
* @version 1.3 - Temporary fix for .name,.pro domains
* @version 1.2 - Error catching for .tv domains
* @version 1.1 - Converted to php
* @version 1.0 - Perl version [http://www.sloppycode.net/sloppycode/Perl[CGI]/s29.html]
*/

class Whois
{
/*
* Optional parameter for the server to be used for the lookup.
* If this is not set, an appropriate whois server for the domain name
* specified is automagically found by the Whois class.
* @type string
* @access public
*/
var $whois_server;
/*
* The timeout, in seconds, for the lookup. Default is 30.
* @type integer
* @access public
*/
var $timeout = 30;

/*
* Returns a string, with new-lines (\n) converted to non-breaking spaces (&lt;BR&gt;),
* with details for the domain specified by $domain.
* @access public
* @param string $domain the domain to lookup, excluding http:// and www
* @return string the results of the whois
*/
function lookup($domain)
{
$result = "";
$parts = array();
$host = "";

// .tv don't allow access to their whois
if (strstr($domain,".tv"))
{
$result = "'.tv' domain names require you to have an account to do whois searches.";
// New domains fix (half work, half don't)
} elseif (strstr($domain,".name") || strstr($domain,".pro") >0){
$result = ".name,.pro require you to have an account to do whois searches.";
} else{
if (empty($this->whois_server))
{
$parts = explode(".",$domain);
$testhost = $parts[sizeof($parts)-1];
$whoisserver = $testhost . ".whois-servers.net";
$this->host = gethostbyname($whoisserver);
$this->host = gethostbyaddr($this->host);

if ($this->host == $testhost)
{
$this->host = "whois.internic.net";
}
flush();
}
$whoisSocket = fsockopen($this->host,43, $errno, $errstr, $this->timeout);

if ($whoisSocket)
{
fputs($whoisSocket, $domain."\015\012");
while (!feof($whoisSocket))
{
$result .= fgets($whoisSocket,128) . "<br>";
}
fclose($whoisSocket);
}
}
return $result;
}
}
?>
  #4 (permalink)  
Antiguo 08/02/2004, 10:24
 
Fecha de Ingreso: octubre-2003
Ubicación: Chiclayo - Peru
Mensajes: 25
Antigüedad: 20 años, 6 meses
Puntos: 0
no lo que estas haciendo tine un error el la etiqueta del From mulario no va en action sino que tienes que incluir un archivo indicando la aplicacion
bueno chau
__________________
:cool: J.C.Q.M
  #5 (permalink)  
Antiguo 08/02/2004, 11:39
 
Fecha de Ingreso: febrero-2004
Mensajes: 3
Antigüedad: 20 años, 2 meses
Puntos: 0
Gracias por tu respuesta, pero, podias ser un poco mas explicito?
es que soy un poco novato.

Gracias

Popel
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:33.