Have an account? Sign in
Login  Register  Facebook
display visitor ip
I want to display the ip of the visitors to a page. for example if a person visits "test.php" page, i should print the ip of the visitor and time on "test.php" page.
Now my question is that can i print it directly without storing data to database or without writing to text file?
Thanks.
Started: September 22, 2011 Latest Activity: September 22, 2011 phpvisitorlog
1 Answer
just use
$_SERVER[\'REMOTE_ADDR\']

example

echo \'my ip is:\'.$_SERVER[\'REMOTE_ADDR\'];

Posted: MacOS
In: September 22, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer