[kwlug-disc] Getting external IP

Khalid Baheyeldin kb at 2bits.com
Sat Jan 27 15:10:14 EST 2018


Do you have any servers hosted outside of your home?

You can put this code in myip.php, then access it as:

http://your.outside.server-ip-or-domain/myip.php

Will print out your IP address.

<?php
$ip = $_SERVER['REMOTE_ADDR'];
header("X-Client-IP-Address: $ip");
print $ip . "\n";
exit(0);
?>

This is what I do since I already have servers at hosting companies,
and I don't want to be subject to yet another company that can change
their API, shut their services, ...etc.


On Sat, Jan 27, 2018 at 2:54 PM, William Park via kwlug-disc
<kwlug-disc at kwlug.org> wrote:
> Hi,
>
> I recently switched to CarryTel, and I'm getting disconnected quite
> often.  So, I want to monitor my external IP, every minute.  For this, I
> usually use <http://myexternalip.com/raw>, but it has rate limit.
> Google gives you IP when you search "what is my ip", but it's difficult
> to dig it out.  Simpler, the better.
>
> What site do you use to get your external IP?  I want to round-robin
> through these.
> --
> William Park <opengeometry at yahoo.ca>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org



-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple,
and wrong." -- H.L. Mencken




More information about the kwlug-disc mailing list