Click here to see your current global IP address.
Chances are, the IP address assigned to you by your ISP changes on a regular
basis. In so doing, the ISP can service more customers since not all
of the ISP's customers are using the Internet line at any given time.
If only 100 IP addresses are available, the ISP can provide Internet
connection to multiples of that number of customers. This usually is
no big deal because you simply access other servers in the Internet and you
could be using any IP address. Most consumer-type Internet
connections are of the dynamic address type.
Since your IP address can change dynamically (thus the term "dynamic address") it would not be an easy matter for you to install a server that everyone in the Internet community can access. Recently, this constraint has been minimized through so called Dynamic DNS service -- a particular domain name is pointed to a dynamic IP address, such that whenever the IP address changes, the domain name server database is updated to reflect the new IP address. This technology has allowed many to run Internet servers even with dynamic IP addresses.
Dynamic DNS service is great, but it can be overkill if all you want to do is have a temporary server in place for the moment. All you need to know is what your current global IP address is.
Suppose, for example, you install a web server in your computer (a web server is bundled in Windows, but it is not installed by default.) If you know what global IP address you are currently using, you can have the Internet community access your web server with the URL http://XXX.XXX.XXX.XXX . For as long as your global IP address has yet not changed, your web server is accessible by everyone who knows your URL.
Note: Some
ISP's block port 80 (among others) to prevent customers from installing
servers. This minimizes overloading their Internet pipe/lines. If
that is the case with your ISP, this tip will not work for you.
Of course, if you are using a router your global dynamic IP address is used by the router, not your PC. You will need to forward port 80 to the particular PC you have installed your web server. When you are connected to the Internet via a router, your PC will typically have a local IP address in the format of 192.168.1.X . You will also need to set your PC's local address to a fixed one instead of getting a local address automatically from the router's DHCP server so that port 80 will always be forwarded to the correct PC. How to do this is beyond the scope of this discussion. You can check out the "how to" by reading the manual of your router.
Many programmers and script authors want to give their programs the capability to access a computer's current global IP address to allow two or more PCs to connect/talk with each other. If you have a web site hosted by an ISP who supports PHP scripts, you can upoad this simple PHP script in your web site:
--- PHP Script ---
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
// The headers above insure the data is not cached.
// The Old Expire date is to insure any previous downloads are
// treated as obsolete.
// Do not put any comments above the header codes as PHP
// wants headers to be the first lines in a PHP script.
//********
// The code below filters out unnecessary data which might be
// fed into the script (accidental or intentional) -- otherwise
// a security hole.
if (!empty($_POST))
{
Exit;
}
if (!empty($_GET))
{
Exit;
}
if (!empty($_COOKIE))
{
Exit;
}
// This last check is reduntant, but here just in case...
if (!empty($_REQUEST))
{
Exit;
}
// This is not part of $_REQUEST, so must be filtered separately.
if (!empty($_FILES))
{
Exit;
}
//******
// The echo below is what is returned; the global IP address
// clean of any html tags, so no parcing is necessary upon
// receipt.
echo $host = $_SERVER['REMOTE_ADDR'];
exit;
// If your web hosting ISP supports PHP, you can place this
// PHP script in your web site and access it to check out the
// current IP global (dynamic) address your PC is using directly
// or via a router (i.e., the dynamic IP address your router
// is using.)
// If routers are used, you can configure the local and remote
// routers to forward particular port/s to the PC's local IP
// addresses. Once the relevant IP addresses and ports are
// known (mutually advised via email?), the local and remote
// PC's can be made to talk to each other via an Autoit script.
?>