You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Paul Git 1b00a4165c Correct regex for config files 5 months ago
flags Implmented country flags on HTML output using images from https://ip2location.com 6 months ago
.gitignore Add .gitignore 5 months ago
.htaccess Correct regex for config files 5 months ago
LICENSE Enhanced script to allow different formats to be output. 6 months ago
README.md Enhanced script to allow different formats to be output. 6 months ago
config-sample.php Renamed config.php 5 months ago
index.php Modified to use ipinfo.io API instead of IP2Location as location is more accurate 6 months ago
robots.txt Implemented IP location on HTML output usimg database from https://ip2location.com 6 months ago

README.md

whatsmyip

This is a simple PHP script to return your true external ip address, it even works around proxies. This was forked from Testo Development’s script.

I have enhanced the original script by allowing an additional format specifier. By default an html version of your IP address will be displayed on your screen. This is formated to be large on both desktop and mobile devices. I have no idea if the CSS is valid as I find CSS to be voodoo, so any suggestions of improvements would be welcome. Other formats available are text and JSON.

Example usage

html format

text format

json format

You can see the script in action at https://ip.poyo.ch