@SpectreReturnsNov 18.2005 — #Wrong. Use $_ENV["REMOTE_ADDR"], because the other one will only work with register_globals on, and thus causes big security holes.
@tbirnsethNov 18.2005 — #Hmm... I think you need a php.ini setting to get it into the environment too. So why not use: $_SERVER['REMOTE_ADDR'] which is where both the above get their info anyway?
@JDM71488Nov 19.2005 — #wow, i didn't know it would cause security holes. sorry. i thought that $remote_addr and $_server['remote_addr'] was the same thing security wise...
@Daniel_TNov 19.2005 — #wow, i didn't know it would cause security holes. sorry. i thought that $remote_addr and $_server['remote_addr'] was the same thing security wise...[/QUOTE]register_globals() causes all superglobals to be assigned to normal variable names by their keys. For example, $_SERVER['REMOTE_ADDR'] would become $remote_addr. Likewise, $_GET['REMOTE_ADDR'] could become $remote_addr, so someone could send a different IP address by adding [i]remote_addr=123.45.678.910[/i] to the querystring.