$ip - returns your IP address.

Are you really looking for the user's IP or are you looking for the portion of address after " @ "?

For a starter look at $site