Closed Fuitad closed 6 years ago
I'm actually wrong. For the google.com query, when the code gets to function deepWhois in WhoisClient.php, the dump of $result['regyinfo'] is only
Array ( [registrar] => MarkMonitor Inc. )
So $result is returned without any further whois being performed. Because of this, the data is highly incomplete (missing expiration, etc...)
Ah! seems to be related to whois.gtld.php line 37. I changed
'Whois Server:' => 'regyinfo.whois',
to
'Registrar WHOIS Server:' => 'regyinfo.whois',
And deepwhois started working again. But I'm wondering. Is there a reason why the script doesn't do case insensitive matching?
In fact, changing line 340 of whois.parser.php from
$pos = strpos($val, $match);
to
$pos = stripos($val, $match);
Also fixed DeepWhois for GTLD and appears to be a better fix than my earlier comment. I'm still not sure if it won't break anything else tho.
@webalternative any opinion on this issue?
Hi! sorry, I was very busy in the last few weeks... I will take a look this week-end :-)
Cool! Take a look at my branch https://github.com/Fuitad/phpWhois/tree/fixing-deepwhois-gtld
Like I said previously, it seems to be working but I'm not sure I didn't break anything else while fixing this :P
Hi! I have applied your fix on my site dev version... And yes, I get much more complete results using your fix.
Actually, it's seems to work with every TLDs I have tested with.
If you submit a Pull request I will merge it...or I will add it to the code this week manually if no Pull request is made
Done. Thank you!
Seems like the whois is either not parsed correctly or the code was not adapted. See screenshot (code is on top and actual result for google.com query under)
https://i.imgur.com/PvFFinz.png