Ver Mensaje Individual
  #6 (permalink)  
Antiguo 13/10/2005, 17:28
marcinf2
 
Fecha de Ingreso: enero-2002
Ubicación: Lima
Mensajes: 461
Antigüedad: 22 años, 2 meses
Puntos: 1


bueno he probado con este codigo en php
Código:
<?php 
if(isset($_POST["dominio"])){

$dom = $_POST['dominio']; 
    //aki las lineas que comprueban si existe el dominio
	if ($dom){
	include "./whois.inc";
	$whoisresult = lookup($dom);
	$isavail = $whoisresult[0]; // Contiene "1" si esta disponible, 0 si esta registrado
	$whotext = $whoisresult[0]; // Contains the full response from the server.
	//si existe haces que la variable $existedominio sea TRUE 
    //sino, haces que sea FALSE 
    //por ahora esta con TRUE 
    if($whoisresult[0]==1){ 
        echo '&respuesta=disponible'; 
    }else{ 
        echo '&respuesta=registrado'; 
    } 
} 
?>
y codigo flash
Código:
enviar = function () {
	dom_lv = new LoadVars();
	dom_lv.dominio = dominio_txt.text;
	dom_lv.sendAndLoad("example1.php", dom_lv, "POST");
	dominio_txt.text = "";
	mensaje_txt.text = "Enviando Mensaje..";
	dom_lv.onLoad = function(cargo) {
		if (cargo) {
			mensaje_txt.text = "CARGO";
			if (this.respuesta == 'disponible') {
				mensaje_txt.text = "Dominio disponible";
				dominio_txt.text = "";
			} else {
				mensaje_txt.text = "Dominio registrado";
			}
		} else {
			mensaje_txt.text = "NO CARGO";
		}
	};
};
enviar_btn.onRelease = enviar;
y poniendole cualquier dominio me sale siempre registrado

por que?

el codigo lo he probado con formulario html y php y funciona bien