Subversion Repositories vgwhois

Rev

Rev 11 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 149
Line 10... Line 10...
10
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
10
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
11
#
11
#
12
 
12
 
13
require_once __DIR__ . '/../../../shared/php_includes/common_functions.inc.php';
13
require_once __DIR__ . '/../../../shared/php_includes/common_functions.inc.php';
14
 
14
 
-
 
15
ini_set('default_charset', 'UTF-8');
-
 
16
 
15
$domain = isset($argv[1]) ? $argv[1] : '';
17
$domain = isset($argv[1]) ? $argv[1] : '';
16
 
18
 
17
$url = "http://www.nic.ac/cgi-bin/whois?query=$domain";
19
$url = "http://www.nic.ac/cgi-bin/whois?query=$domain";
18
 
20
 
19
$res = "% Parsing via regex from '$url'\n\n";
21
$res = "% Parsing via regex from '$url'\n\n";
Line 44... Line 46...
44
	'Primary Nameserver',
46
	'Primary Nameserver',
45
	'Secondary Nameserver'
47
	'Secondary Nameserver'
46
);
48
);
47
 
49
 
48
foreach ($special_words as $s) {
50
foreach ($special_words as $s) {
49
	$x = str_replace($s, "\n".strtoupper($s)."\n", $x);
51
	$x = str_replace($s, "\n".mb_strtoupper($s)."\n", $x);
50
}
52
}
51
 
53
 
52
$x = make_tabs($x);
54
$x = make_tabs($x);
53
 
55
 
54
$x = trim($x);
56
$x = trim($x);