-
Notifications
You must be signed in to change notification settings - Fork 161
/
Copy pathtrademarknotice.php
38 lines (32 loc) · 955 Bytes
/
trademarknotice.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require("../autoloader.php");
use Metaregistrar\TMCH\dnlTmchConnection;
use Metaregistrar\TMCH\cnisTmchConnection;
use Metaregistrar\TMCH\tmchException;
$domain = 'nike';
$domainkey = null;
try {
$dnl = new dnlTmchConnection(true,'');
$cnis = new cnisTmchConnection(true,'');
$list = $dnl->getDnl();
if (count($list)==1) {
echo "empty list received\n";
echo $list[0]."\n";
} else {
foreach ($list as $line) {
if (strlen($line)>0) {
list($domainname, $key) = explode(',', $line);
if ($domainname == $domain) {
$domainkey = $key;
}
}
}
if ($domainkey) {
echo $cnis->showWarning($cnis->getCnis($domainkey), false);
} else {
echo "Domain name not found in CNIS list\n";
}
}
} catch (tmchException $e) {
echo "ERROR: " . $e->getMessage() . "\n";
}