HTTP Environment Variables (Chapter 6)

Main Lab 5 Page


Another environment variable that can come in quite handy is the REMOTE_ADDR variable. Which displays the IP address of the user accessing the page.

Generally, one can access this variable by entering $REMOTE_ADDR. However, miscoding could result in the file pulling down the wrong data. The solution to this is to use the getenv function, which will pull down the specific data for that environment variable, which can then be assigned to any conventional variable.

Your IP address is 3.135.241.191.