A minimalistic web page that displays the visitor's IP address (and hostname if available) with animated gradient styling, auto-scaling, copy-to-clipboard functionality, and beautiful loading bars.
- 🔍 Automatically displays:
- IP address
- Hostname (if resolvable)
- 🎨 Dynamic animated gradient per host/IP
- 📏 Auto-fit long IPv6 addresses using JavaScript scaling
- 🖱 Click-to-copy with visual feedback (
Copied
) - ⚡ Loading animation bars on all four screen edges
- 📱 Mobile responsive design (no line breaking, no overflow)
- 🖥 CLI support:
curl
orwget
returns plain IP only - ⌨️ Keyboard Shortcuts (see below)
curl https://yourdomain.example/ip
203.0.113.42
Web view:
- Clone the repository:
git clone https://github.com/yourusername/ip-viewer.git
-
Upload files to your PHP-enabled web server (Apache, nginx, etc.).
-
Access via browser or curl:
https://yourdomain.example/ip
No config needed. But you can customize:
- Font sizes (
host-style
/ip-style
) - Gradient behavior and animation speed
- Loading bar visibility
- Default font (Impact)
Key | Action |
---|---|
w |
Open iplocation.io whois |
p |
Open iplocation.io ping |
l |
Open networksdb.io for WHOIS |
s |
Open Cloudflare Speed Test |
b |
Open MX Toolbox Blacklist Test |
j |
Open JavaScript Browser Information |
t |
Open Test IPv6 |
r |
Reload the current page |
? / h |
Toggle the help overlay |
The help overlay includes these shortcuts and can be toggled using ?
or h
.
/
├── index.php # Main program logic
├── screenshot.png # (Optional) Preview image
└── README.md # This file
- Uses PHP’s
$_SERVER["REMOTE_ADDR"]
andgethostbyaddr()
to determine client info. - Detects CLI tools (e.g.,
curl
,wget
) viaHTTP_USER_AGENT
. - Uses
crc32()
hash to generate consistent gradient hues. - JavaScript
transform: scale()
resizes long host/IP to fit in one line.
- ✅ PHP 7.0+ (CLI detection, hostname lookup)
- ❌ No frameworks
- ✅ Pure HTML, CSS, and vanilla JavaScript
MIT License © INSANEWORKS,LLC
Feel free to use, modify, and deploy 🚀