I have been asked by many people of the best way to get your IP address. Here I demonstrate a few common methods to get your own IP address
IPCONFIG
By far the quickest and most common method of getting your IP address on Windows based systems is the ipconfig command which is typed at the command prompt.

The above image is the output of the command ipconfig with no arguments
IFCONFIG
To find out your IP address on a Linux / UNIX based system you need to use command ifconfig. If no arguments are given to ifconfig command it displays the status of the current active interfaces
The command syntax typed at the prompt is
$ /sbin/ifconfig
The output of above command displays Ethernet IP address, Mac address, subnet mask and other information
NETSTAT
NETSTAT is a command-line tool that displays network connections, routing tables, and a number of network interface statistics. It is available on Unix/Linux and Windows based operating systems.
The netstat command displays the IP address of the local system and connections

An important point to note is that initially the IP address 127.0.0.1 (localhost) is mentioned under the heading Local Address and when connections are opened to external address (during internet browsing, connecting to systems using protocols like FTP, etc) the actual local IP address of the system is displayed under the column Local Address
Programming Languages
Many programming languages like PHP, ASP, Java, etc have functions, methods to get the IP address of the local system
A sample script to get your IP address using Active Server Pages is mentioned below
<%
Response.Write “Hello! Your IP Address is: ” & Request.ServerVariables(“REMOTE_ADDR”)
%>
In the code abov, within the ASP tags, <% … %>, you can retrieve the IP address of a user through the ServerVariables collection of the Request object
Utilities
There are many utilities available on the internet that allow you to find your own IP address and more. Some of them are
IP Finder
IP Address Monster
Websites
Many websites allow you to find out your IP address and other information. A few of them are
http://whatismyipaddress.com
http://www.samspade.org
http://www.find-ip-address.org
http://www.ipaddresslocation.org

Nice article…
How do I get the IP address of a website
Tushar, getting the IP address of a website can be done in many ways… The simple method is to ping the website…
see the example below with respect to yahoo.com
C:\>ping yahoo.com
Pinging yahoo.com [209.131.36.159] with 32 bytes of data:
Reply from 209.131.36.159: bytes=32 time=232ms TTL=51
Reply from 209.131.36.159: bytes=32 time=232ms TTL=51
Reply from 209.131.36.159: bytes=32 time=232ms TTL=51
Reply from 209.131.36.159: bytes=32 time=232ms TTL=51
Ping statistics for 209.131.36.159:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 232ms, Maximum = 232ms, Average = 232ms
The 209.131.36.159 over here refers to the IP address of yahoo.com
Another method is to run a whois by going to websites like http://www.samspade.org and typing in the domain of the website
Check out this link http://samspade.org/whois/yahoo.com
————————————
Kindly note that this method only works for non-shared websites… smaller websites that might share a server may or may not have a dedicated IP address
————————————
Hope that helps
Thanks Sandra