@@ -43,13 +43,13 @@ class Neustar extends Regex
4343 * @var array
4444 * @access protected
4545 */
46- protected $ blocks = array (1 => ' /domain name:(?>[\x20\t]*)(.*?)(?=registrant id\:)/is ' ,
47- 2 => '/registrant id :(?>[\x20\t]*)(.*?)(?=administrative contact id\:)/is ' ,
48- 3 => '/administrative contact id:(?>[\x20\t]*)(.*?)(?=billing contact id\:)/is ' ,
49- 4 => '/billing contact id:(?>[\x20\t]*)(.*?)(?=technical contact id\:)/is ' ,
50- 5 => '/technical contact id:(?>[\x20\t]*)(.*?)(?=name server\:)/is ' ,
51- 6 => '/name server:(?>[\x20\t]*)(.*?)(?=created by registrar \:)/is ' ,
52- 7 => '/domain registration date :(?>[\x20\t]*)(.*?)(?=> >>>)/is ' );
46+ protected $ blocks = array (
47+ 1 => '/domain name :(?>[\x20\t]*)(.*?)(?=registry registrant id\:)/is ' ,
48+ 2 => '/registry registrant id:(?>[\x20\t]*)(.*?)(?=registry admin id\:)/is ' ,
49+ 3 => '/registry admin id:(?>[\x20\t]*)(.*?)(?=registry tech id\:)/is ' ,
50+ 4 => '/registry tech id:(?>[\x20\t]*)(.*?)(?=name server\:)/is ' ,
51+ 5 => '/name server:(?>[\x20\t]*)(.*?)(?=dnssec \:)/is ' ,
52+ 6 => '/dnssec :(?>[\x20\t]*)(.*?)(?=>>>)/is ' );
5353
5454 /**
5555 * items for each block
@@ -58,11 +58,16 @@ class Neustar extends Regex
5858 * @access protected
5959 */
6060 protected $ blockItems = array (
61- 1 => array ('/sponsoring registrar:(?>[\x20\t]*)(.+)$/im ' => 'registrar:name ' ,
62- '/sponsoring registrar iana id:(?>[\x20\t]*)(.+)$/im ' => 'registrar:id ' ,
63- '/registrar url \(registration services\):(?>[\x20\t]*)(.+)$/im ' => 'registrar:url ' ,
64- '/(?>domain )*status:(?>[\x20\t]*)(.+)$/im ' => 'status ' ),
65- 2 => array ('/registrant id:(?>[\x20\t]*)(.+)$/im ' => 'contacts:owner:handle ' ,
61+ 1 => array (
62+ '/registrar url \(registration services\):(?>[\x20\t]*)(.+)$/im ' => 'registrar:url ' ,
63+ '/updated date:(?>[\x20\t]*)(.+)$/im ' => 'changed ' ,
64+ '/creation date:(?>[\x20\t]*)(.+)$/im ' => 'created ' ,
65+ '/registry expiry date:(?>[\x20\t]*)(.+)$/im ' => 'expires ' ,
66+ '/registrar:(?>[\x20\t]*)(.+)$/im ' => 'registrar:name ' ,
67+ '/registrar iana id:(?>[\x20\t]*)(.+)$/im ' => 'registrar:id ' ,
68+ '/(?>domain )*status:(?>[\x20\t]*)([^\x20\t]+)[ ]+.+$/im ' => 'status ' ),
69+ 2 => array (
70+ '/registrant id:(?>[\x20\t]*)(.+)$/im ' => 'contacts:owner:handle ' ,
6671 '/registrant name:(?>[\x20\t]*)(.+)$/im ' => 'contacts:owner:name ' ,
6772 '/registrant organization:(?>[\x20\t]*)(.+)$/im ' => 'contacts:owner:organization ' ,
6873 '/registrant address[0-9]*:(?>[\x20\t]+)(.+)$/im ' => 'contacts:owner:address ' ,
@@ -88,21 +93,9 @@ class Neustar extends Regex
8893 '/administrative contact facsimile number:(?>[\x20\t]*)(.+)$/im ' => 'contacts:admin:fax ' ,
8994 '/administrative contact email:(?>[\x20\t]*)(.+)$/im ' => 'contacts:admin:email ' ,
9095 '/administrative application purpose:(?>[\x20\t]*)(.+)$/im ' => 'contacts:admin:application_purpose ' ,
91- '/administrative nexus category:(?>[\x20\t]*)(.+)$/im ' => 'contacts:admin:nexus_category ' ),
92- 4 => array ('/billing contact id:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:handle ' ,
93- '/billing contact name:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:name ' ,
94- '/billing contact organization:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:organization ' ,
95- '/billing contact address[0-9]*:(?>[\x20\t]+)(.+)$/im ' => 'contacts:billing:address ' ,
96- '/billing contact city:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:city ' ,
97- '/billing contact state\/province:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:state ' ,
98- '/billing contact postal code:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:zipcode ' ,
99- '/billing contact country:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:country ' ,
100- '/billing contact phone number:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:phone ' ,
101- '/billing contact facsimile number:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:fax ' ,
102- '/billing contact email:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:email ' ,
103- '/billing application purpose:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:application_purpose ' ,
104- '/billing nexus category:(?>[\x20\t]*)(.+)$/im ' => 'contacts:billing:nexus_category ' ),
105- 5 => array ('/technical contact id:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:handle ' ,
96+ '/administrative nexus category:(?>[\x20\t]*)(.+)$/im ' => 'contacts:admin:nexus_category ' ),
97+ 4 => array (
98+ '/technical contact id:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:handle ' ,
10699 '/technical contact name:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:name ' ,
107100 '/technical contact organization:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:organization ' ,
108101 '/technical contact (street|address)[0-9]*:(?>[\x20\t]+)(.+)$/im ' => 'contacts:tech:address ' ,
@@ -115,16 +108,34 @@ class Neustar extends Regex
115108 '/technical contact email:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:email ' ,
116109 '/technical application purpose:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:application_purpose ' ,
117110 '/technical nexus category:(?>[\x20\t]*)(.+)$/im ' => 'contacts:tech:nexus_category ' ),
118- 6 => array (' /name server:(?>[\x20\t]+)(.+)$/im ' => ' nameserver ' ),
119- 7 => array ( ' /domain registration date :(?>[\x20\t]* )(.+)$/im ' => 'created ' ,
120- ' /domain expiration date:(?>[\x20\t]*)(.+)$/im ' => ' expires ' ,
121- '/domain last updated date :(?>[\x20\t]*)(.+)$/im ' => 'changed ' ));
111+ 5 => array (
112+ ' /name server :(?>[\x20\t]+ )(.+)$/im ' => 'nameserver ' ),
113+ 6 => array (
114+ '/dnssec :(?>[\x20\t]*)(.+)$/im ' => 'dnssec ' ));
122115
123116 /**
124117 * RegEx to check availability of the domain name
125118 *
126119 * @var string
127120 * @access protected
128121 */
129- protected $ available = '/Not found:/i ' ;
122+ protected $ available = '/No Data Found/i ' ;
123+
124+ /**
125+ * After parsing ...
126+ *
127+ * If dnssec key was found we set attribute to true.
128+ *
129+ * @param object &$WhoisParser
130+ * @return void
131+ */
132+ public function postProcess (&$ WhoisParser )
133+ {
134+ $ ResultSet = $ WhoisParser ->getResult ();
135+ if (preg_match ("/unsigned/i " , $ ResultSet ->dnssec )) {
136+ $ ResultSet ->dnssec = false ;
137+ } else {
138+ $ ResultSet ->dnssec = true ;
139+ }
140+ }
130141}
0 commit comments