Get Dynamic And Static IP Address Of Visitor In PHP

by on March 14th, 2008

Suppose we have a website and we want to get the user IP address and want to display it for him or we want to store it and get a log for the hits of website. Also sometimes users may share same IP address for internet sharing & usage so his PC’s IP will be something like (Proxy Case) and actual IP address which he is using for internet, shared by his internet service provider will be different. We can find these both IP by this simple example of PHP code.

Use the following code.

$domain - ";
echo "Viewer's PC IP Address: $domain1";

For more PHP scripts: Visit [ PHP Magic Book ]

One Review

  1. Theophilus omoregbee says:

    This cool.thank you