Skip to content

Commit e0cce85

Browse files
committed
Added test file
1 parent e8dd7a1 commit e0cce85

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

readme.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ Ever wanted to do DNSSEC validation in PHP?
22

33
This dnssec validator is written in 100% PHP5. It contains an object-oriented DNS module that can retrieve any record from a nameserver.
44

5+
No other modules or downloads needed
6+
57
The validator has been tested extensively on .NL and .EU domain names, but not on other ones.
68

7-
Please feel free to test, use, add or modify.
9+
Please feel free to test, use, add or modify.
10+
11+
To use this suite:
12+
- Clone this repository
13+
- php test.php <domainname>
14+
15+
At this time it will only test .nl, .eu and .com domains because the nameservers are known for these extensions. Nameservers can be added for other extensions.
16+
See DNS/dnsProtocol.php function registrynameservers()

test.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
include_once('validate.php');
3+
4+
5+
if ($argc<1) {
6+
die("Usage: test.php <domainname>\n\n");
7+
}
8+
$domainname = $argv[1];
9+
10+
try {
11+
validateDomain($domainname);
12+
} catch (DnsException $e) {
13+
echo "ERROR: ".$e->getMessage()."\n";
14+
}

0 commit comments

Comments
 (0)