Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
PHP
« Previous
Next »
In which variable is the users IP address stored?
Options
- $DOMAIN
- $REMOTE_ADDR
- $GLOBALS
- $_ENV
CORRECT ANSWER : $REMOTE_ADDR
Discussion Board
Old Answer
The answer is valid for old default config
The new default config you need $_SERVER['REMOTE_ADDR']
JB 04-21-2017 11:41 AM
IP address stored
Answer : $REMOTE_ADDR.
PHP has in built facility to detect remote browser, IP address, and other properties. These values are assigned to special variable.
In this case, it is assigned to a variable called $REMOTE_ADDR.
Syntax:
$ip= $REMOTE_ADDR;
IamJay 02-9-2015 06:17 AM
wft
There is no predefined variable:
$REMOTE_ADDR
you may think : $_SERVER['REMOTE_ADDR'] ????
Szabi 01-21-2014 11:56 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
PHP (39)
DHTML (10)
CSS (21)
MySQL (20)
VLSI (9)
XML (28)
UML (11)
HTML (19)
Fedora (61)
HTML5 (60)
Android (100)
Advertisement
▲