What would be the correct, and most efficient way of collecting somebody's IP address so I can store it in the log files on my site?
don't worry, got it
$ip_address = $REMOTE_ADDR;
You could also use:
if(getenv(HTTP_X_FORWARDED_FOR)){ $ip = getenv(HTTP_X_FORWARDED_FOR); } else{ $ip = getenv(REMOTE_ADDR); }
Hope this helps.