koroban / WhoisParser

Lookup domain names, IP addresses and AS numbers by WHOIS
http://www.novutec.com
136 stars 124 forks source link

Cannot parse country when using .ch/switch template #13

Open mariuswilms opened 11 years ago

mariuswilms commented 11 years ago

I get the following error when querying for whois on a .ch domain:

PHP Notice:  Undefined offset: 4 in /[...]/Templates/Switch.php on line 103

It seems the country isn't correctly parsed.

https://github.com/novutec/WhoisParser/blob/master/Templates/Switch.php#L103

This is the data I get from the whois query:

whois: This information is subject to an Acceptable Use Policy.
See http://www.nic.ch/terms/aup.html

Domain name:
johnsmith.ch

Holder of domain name:
smith john
teststreet 11
CH-1234 City
Switzerland
Contractual Language: German

Technical contact:
smith john
teststreet 11
CH-1234 City
Switzerland

DNSSEC:N

Name servers:
[...]