php - Why my ipaddress is 127.0.0.1 on localhost -


$_server['remote_addr']; 

this code used user's ip. if i'm on localhost gives 127.0.0.1 ip not , if go live web page ip address another. i'm user why ip 127.0.0.1?

you said:

if on localhost gives 12.0.0.1

that's correct because address localhost. see here if you'd know why has address.

from wikipedia entry on localhost:

in computer networking, localhost means computer. hostname computer's software , users may employ access computer's own network services via loopback network interface. using loopback interface bypasses local network interface hardware.

i hope helps.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -