This php-whois file can lookup domains as well as IPs WHOIS details.
Download the file or copy paste the codes in your desired php file and run it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.