Here's some php code to do it with.
<?php
echo "Your IP is";
echo $_SERVER["REMOTE_ADDR"];
function get_ip_address() {
// check for shared internet/ISP IP
if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP']))
return...