English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I tried these and
they don't display anything, not even zeros.

echo "Your IP Address is $_SERVER[REMOTE_ADDR]";
?>

Displays the IP address of my hosting provider's server and not the visitor's.

2007-02-04 03:59:25 · 2 answers · asked by Hello 1 in Computers & Internet Programming & Design

2 answers

What you have is correct, but your provider might be using a reverse proxy which would throw that off.

try:
$_SERVER['HTTP_X_FORWARDED_FOR']

instead.

(I'm not sure why it's getting cut off. Just replace REMOTE_ADDR with X_FORWARDED_FOR in your command.)

2007-02-04 06:01:27 · answer #1 · answered by Vegan 7 · 0 0

2007-02-04 05:59:42 · answer #2 · answered by diane_nardozzi 2 · 0 0

fedest.com, questions and answers