This is a toy project that implement a whois client in PHP.
First you need to install dependencies with Composer:
$ composer install
Then you can use the CLI command:
$ php bin/whois [domain]
Or start a web server:
$ php bin/server
The web server can be configure with environment variables:
IP
: the IP address to listenPORT
: the port to use
Example: IP=0.0.0.0 PORT=8000 php bin/server
The source code use typed properties which is available since PHP 7.4.
I use Docker to test it. There is a Dockerfile in a project which use phpdaily to work with PHP development branches.
The web server is provided by ReactPHP HTTP server component.