Script to show user's IP Address and other public details which the browser sends.
# apt install composer
# cd /path/to/your/website/directory/
Download GeoLite2-Country.mmdb from https://www.maxmind.com/ (you need an account).
# curl -sS https://getcomposer.org/installer | php
# php composer.phar require geoip2/geoip2
Install this package: geoipupdate on your server.
Your publicly visible IP Address
Will show a warning if you are behind a proxy
Full browser signature
The port used for current connection
Best guess country (via GeoIP database)
Oh, well... This is actually the worst part, because there is no real method of detecting the actual display resolution, so we try to guess it using the browser's data.
The actual browser window size.
Just a horrible thing which is (probably) never accurate, especially on mobile devices.
See this in action at https://ip.ptm.ro/.