To get straight to the point: your current IP address is 98.83.25.105. If you want to also look at your User-Agent, Proxy-Forwarded IP and/or Client IP you can visit this page. If you're interested in additional info regarding this topic, keep reading.
It's not uncommon, while developing web sites & services, to have the sudden urgency to check the public IP of the machine we're using or configuring: against a third-party service - the one used for Internet connection, if more than one. Of course we could do that in a number of different ways - ipconfig , router admin interface & more - but nothing is as immediate, undebateable and bullet-proof such a good old "ShowMyIP" service: no wonder there are thousands of these - all very similar to each other. There's nothing wrong in using them, expecially if you need to have this information in a matter of seconds.
Personally, I do have three main issues with the vast majority (99.9%) of all these websites:
- the insanely huge amount of Ads, which often also do their best to hide the actual information we're looking for: that's the main reason for them to being there most of the times.
- the blatant inability of being able to show the IP address in the right place, such as the above-the-fold portion of the page: could it be so difficult, in a web service born to show precisely that info? Of course it is, expecially if the real purpose is showing us all of these Ads.
- the chronic lackness of client info such as IP-Forwarded Proxy, User-Agent, Custom Headers, Client-IP and more. Ok, we're not talking of the core business here, which is showing the actual IP Address: I can accept that. But we're talking about useful, relevant info which could be very useful to a lot of users who went there looking to obtain hints regarding their client... there could be worse things to fill up the web page with... Like the Ads, for example.
That's why I resolved to create my very own ShowMyIP page, featuring the following info:
- Client IP Address sent by the Web Server, with a small explanation about how it has been fetched.
- Proxy-Forwarded IP Address (if present), with a small explanation about how it has been fetched and how (un)reliable it is.
- Client IP Address (if present), with a small explanation about how it has been fetched and how (un)reliable it is.
- User-Agent sent by the browser, coupled with some client-related info.
You can take a look at that page by clicking here: below the post, for the geeks among you, I also published the PHP code I wrote to create it, with detailed comments.
If you would like to add more client-related info to the page, please let me know and I'll add them.
Happy sniffing!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
function PrintUserExtendedIPInfo() { $remote_label="Here's your current IP Address:"; $remote_info="This is the IP Address sent by the Web Server: usually reliable, it could not show the real IP address of your machine if you're behind a Proxy service: it's also kinda difficult to spoof/hack. It has been obtained by looking at the <strong>REMOTE_ADDR</strong> Server Variable."; $client_label="IP Address sent by your Browser:"; $client_info="This is the IP Address sent by your browser client: if set, it usually shows the real IP address of your machine. It can be easily altered/spoofed/hacked by altering your browser client's settings. It is obtained by looking at the <strong>HTTP_CLIENT_IP</strong> Server Variable."; $forward_label="IP Address sent by your Proxy:"; $forward_info="This is the IP Address sent by the Proxy server you're using to connect to this page: if present, it usually shows the real IP address of your machine - providing your Proxy is properly set to pass it out. It can be easily altered/spoofed/hacked by altering your browser client's settings, manipulating your Proxy or adding another Proxy to the chain. It is obtained by looking at the <strong>HTTP_X_FORWARDED_FOR</strong> Server Variable."; $ua_label="User-Agent sent by the Browser:"; $ua_info="This is the custom string sent by your browser client including: product name and version, layout engine name and version, & more. For more info, see <a href='https://en.wikipedia.org/wiki/User_agent' target='_blank'>User-Agent on Wikipedia</a>."; // Very unreliable: can be spoofed/falsified easily. $client = $_SERVER['HTTP_CLIENT_IP']; // Very unreliable: can be spoofed/falsified easily. $forward = $_SERVER['HTTP_X_FORWARDED_FOR']; // This is the only really reliable information we have, as it is transmitted by the web server that is handling the request. // It can be theoretically falsified, but requires much harder skills than spoofing a header value, as is an entirely different type of hack. $remote = $_SERVER['REMOTE_ADDR']; echo "<div><span class='title-label'>$remote_label</span><span class='value'>$remote</span><span class='info'>$remote_info</span></div>"; $css_class=""; if (!$client || filter_var($client, FILTER_VALIDATE_IP)) { $cls =" class='disabled'"; $client="N/A"; } else $cls = ""; echo "<div$cls><span class='title-label'>$client_label</span><span class='value$cls'>$client</span><span class='info'>$client_info</span></div>"; if (!$forward || !filter_var($forward, FILTER_VALIDATE_IP)) { $cls =" class='disabled'"; $forward="N/A"; } else $cls = ""; echo "<div$cls><span class='title-label'>$forward_label</span><span class='value'>$forward</span><span class='info'>$forward_info</span></div>"; $ua = $_SERVER['HTTP_USER_AGENT']; if (empty($ua)) { $cls =" class='disabled'"; $ua = "(none - user agent string is empty)"; } else $cls = ""; echo "<div$cls><span class='title-label'>$ua_label</span><span class='value ua'>$ua</span><span class='info'>$ua_info</span></div>"; } PrintUserExtendedIPInfo(); |