A modern IP inspection website powered by ip.sb API.
- Current version: v0.1.0
- Versioning: SemVer (
MAJOR.MINOR.PATCH)
- Auto-detect visitor IP on homepage
- Dual-stack detection for both IPv4 and IPv6
- Manual query for any IPv4 / IPv6 address
- Geo data from
ip.sb(ASN, organization, location, ISP, timezone) - Localized location display (Chinese country/city)
- Flag display strategy:
- Windows:
flagcdnSVG - macOS / iOS / Android / others: emoji flag
- Windows:
- Cookie consent banner with persisted choice
- Process-manager style UI inspired by pm3 design language
- PHP 8.5
- Vanilla JavaScript
- Plain CSS (no framework)
.
├── index.php # Main entry + backend API proxy logic
└── assets/
├── style.css # All page styles
└── app.js # Cookie + auto IP detection logic
- PHP
>= 8.5 curlextension recommended (fallback available)- Public outbound access to:
https://api.ip.sbhttps://api-ipv4.ip.sbhttps://api-ipv6.ip.sbhttps://flagcdn.com
php -S 127.0.0.1:8080Open: http://127.0.0.1:8080
This project uses ip.sb endpoints:
https://api.ip.sb/geoip/{ip}?lang=zh-CNhttps://api-ipv4.ip.sb/iphttps://api-ipv6.ip.sb/ip
You can deploy with any standard PHP runtime:
- Nginx + PHP-FPM
- Apache + mod_php / PHP-FPM
- Caddy + PHP FastCGI
Ensure index.php is the web root entry and outbound API access is allowed.
- Input IP is validated server-side
- Geo lookup is requested server-side (no direct third-party API key exposure)
- Cookie consent is stored in both
localStorageand cookie (SameSite=Lax)
- Add JSON copy button
- Add multi-language UI
- Add response cache layer
- Add CI workflow (lint + basic smoke test)
MIT License.