Subversion Repositories vgwhois

Compare Revisions

Regard whitespace Rev 148 → Rev 149

/trunk/main/subprograms/tt
5,7 → 5,7
# VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
# Subprogram: tt TLD whois
#
# (c) 2011 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
# (c) 2011-2024 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
#
# License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
#
12,6 → 12,8
 
require_once __DIR__ . '/../../shared/php_includes/common_functions.inc.php';
 
ini_set('default_charset', 'UTF-8');
 
$domain = isset($argv[1]) ? $argv[1] : '';
 
$url = "https://www.nic.tt/cgi-bin/search.pl";
21,15 → 23,21
 
$x = file_get_contents2($url, $post);
 
preg_match_all('|<div id="main">(.*)<div id="foot">|ismU', $x, $m);
preg_match_all('|<div class="main">(.*)<div id="foot">|ismU', $x, $m);
if (!isset($m[1][0])) {
echo "Error while parsing the web content (RegEx failed).\n";
exit(1);
}
 
$x = $m[1][0];
 
$x = str_replace("under <a href='https://www.nic.tt/cgi-bin/status.pl'>Retrieve->Domain Details</a>", "here: https://www.nic.tt/cgi-bin/status.pl", $x);
 
# The Domain Name <font color=red>nia.tt</font> is available.
$x = str_replace('<font color=red>', '', $x);
$x = str_replace('</font>', '', $x);
 
# Entferne, wenn möglich:
# Entferne, wenn möglich:
# Domain Search Form
# Enter Domain Name:
$bry = explode('</form>', $x, 2);
59,6 → 67,7
'Registrant Address',
'DNS Hostnames',
'DNS IP Addresses',
'Registration Date',
'Expiration Date',
'Administrative Contact',
'Technical Contact',
66,7 → 75,7
);
 
foreach ($special_words as $s) {
$x = str_replace("\n$s\n", "\n\n".strtoupper($s)."\n\n", $x);
$x = str_replace("\n$s\n", "\n\n".mb_strtoupper($s)."\n\n", $x);
}
 
$x = trim($x);