
01/08/2008, 12:00
|
| | Fecha de Ingreso: marzo-2007
Mensajes: 5
Antigüedad: 17 años, 10 meses Puntos: 0 | |
Respuesta: Whois para dominios .com.ar? jaja me parece que la respuesta la tenia que poner aca:
<?php
if (!isset($_POST['consultar'])){
?>
<link rel="stylesheet" type="text/css" media="screen" href="estilos.css" />
<form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>" title="Consulta de disponibilidad de dominios">
<fieldset>
<legend>
<input size="20" name="nombre" value="sudominio" onfocus="this.value='';" type="text">
</legend>
<button type="submit" name="consultar" value="consultar">consultar</button>
</fieldset>
</form>
<?php
} else {
$url = "http://www.nic.ar/consdom.html";
$extension = ".com.ar";
$nombre = $_POST['nombre'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded"));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
$postvalue = "nombre=$nombre&dominio=$extension";
curl_setopt($ch, CURLOPT_POSTFIELDS,$postvalue);
curl_setopt($ch, CURLOPT_REFERER,$url);
$result= curl_exec ($ch);
curl_close ($ch);
print $result;
}
?>
bueno despues me cuentan...
zacarias
Última edición por jandres4; 05/08/2008 a las 18:37
Razón: firma en cuerpo de mensaje
|