Any real difference between
$_SERVER['REMOTE_ADDR']
$_SERVER['SERVER_ADDR']
I’m tracking visitors to a page, and I’ve always used REMOTE_ADDR, but recently I saw a script that collected both information. Is this a better practice or not needed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
SERVER_ADDRis the address of the server PHP code is run on. You don’t need to collect it.REMOTE_ADDRis the one you want.