Conversation
Fixed whois server for .go.id and .mil.id also added support for .web.id
added new prefix "negation" for check isAvailable, added new rule for SK domain into whois servers JSON
|
Hi! At first I believed Your change to be correct and quite nice, however after re-scanning it and changes needed to both whois.servers.json and general logic of processing whois, I came to conclussion that this might not be the best way to handle this 😉 In my opinion you could use grouping operators and negative lookaheads. That way instead of complicating code for parsing, you could write single regex for all cases (that kind of thing is mandatory in most stuff I have to deal with). For example, let's say registry returns 3 different is-available responses for 3 different reasons of domain availability: So, instead of putting those 3 lines in json and generally complicate parsing of that json, why not write them as single regex: Single line, covers all 3 cases. Now - what about negative match? Say this says domain is not available, and registry returns random gibberish for available domains: That put in negative regex would be (I might be mistaken here ;) ): I'm working on active and more-maintained fork, so I want to incorporate as many good changes as possible 😄 |
| $return = true; | ||
|
|
||
| if (is_array($not_found_strings)) { | ||
| foreach ($not_found_strings as $not_found_string) { |
There was a problem hiding this comment.
You have to respect the original codestyle when you're making a PR.
not_found_string as array for multiple options,
added new prefix "negation" for check isAvailable,
added new rule for SK domain into whois servers JSON