$_SERVER['REMOTE_ADDR'] definitely works - I think you must have some other problem.
$REMOTE_ADDR however will not work with register globals off.
If you're script logic links users to IPs, don't forget that many people have dynamic IPs and, on some office networks, several computers can have the same IP.