logo
  • Entries
  • Comment
  • Popular
Recent Posts
  • Tu nombre es un poema...
  • Cuando las puertas estan cerradas...
  • Estoy sin razon...
  • Anhelo...
Recent Comments
Popular Articles
  • Hola PYTHON, chau PHP! (0)
  • Curriculum Vitae (0)
  • Hola PYTHON, chau PHP! (0)
  • Hola PYTHON, chau PHP! (0)
  • Home
  • Contacto
  • Curriculum Vitae
  • Emanon Framework
  • Emanon Linux
  • Proyectos
  • Scripts Simples

Scripts Simples

Simple Whois Script for NIC.ar

No tiene mucho de mágico, un poco de PHP y utilizando librerías curl podemos efectuar consultas a http://www.nic.ar tales como si esta disponible un dominio:

Source: whoisartar

Fuente sin todo el cocoliche HTML:

PLAIN TEXT
PHP:
  1. <?
  2. $url = "http://www.nic.ar/consdom.html";
  3. $extension = $_POST['extension'];
  4. $nombre = $_POST['nombre'];
  5. $ch = curl_init();
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7. curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded"));
  8. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
  9. curl_setopt($ch, CURLOPT_URL,$url);
  10. curl_setopt($ch, CURLOPT_POST, 1);
  11. $postvalue = "nombre=$nombre&dominio=$extension";
  12. curl_setopt($ch, CURLOPT_POSTFIELDS,$postvalue);
  13. curl_setopt($ch, CURLOPT_REFERER,$url);
  14. $result= curl_exec ($ch);
  15. curl_close ($ch);
  16. print $result;
  17. ?>

Archives

  • January 2009
  • November 2008
  • September 2008
  • June 2008
  • June 2007
  • March 2007
  • February 2007
  • January 2007
  • October 2004
  • September 2004
  • May 2004
  • April 2003

Categories

  • En Portada
  • Escritorios
    • Gnome
  • General
    • Humor
    • Opinion
    • Wordpress
  • Literatura
    • Libre
    • Poemas
  • Programacion
    • Bash
    • Mono
    • Perl
    • PHP
      • OpenID
    • Python
  • Seguridad
  • Servidores
    • Apache
    • Bind DNS
    • FireBird SQL

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Search

Meta

  • Register
  • Log in
  • Valid XHTML
  • XFN
  • WordPress
Powered by Wordpress | Designed by Elegant Themes