Merianos Nikos Merianos Nikos - 2 months ago 44
PHP Question

Is public IP address?

I would like to know whether there is any easy method to check whether an IP address is publicly accessible or is private.

More specifically. I know for example, that is a private IP address that point into the same machine, if for broadcasting into the same network, is for local network addresses and so on. But how can I distinguish whether a given IP address is not one of the private IP and is publicly accessible?

Answer lists the various ranges. Just construct an if statement.