Subversion Repositories vgwhois

Rev

Rev 5 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

#!/usr/bin/php
<?php

#
#  VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
#  Subprogram: sn TLD whois
#
#  (c) 2013 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
#
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
#

require_once __DIR__ . '/../../shared/php_includes/common_functions.inc.php';

$domain = isset($argv[1]) ? $argv[1] : '';

$url = 'http://whois.nic.sn/';

$post = "domaine=$domain";

$cont = file_get_contents2($url, $post);

preg_match('@<div class="content">(.+)</div>@ismU', $cont, $m);

$cont = $m[1];

$cont = strip_tags($cont);

echo trim(html_entity_decode($cont))."\n";