Today I noticed that $_SERVER['REMOTE_ADDR'] always contains "127.0.0.1" instead of correct remote host address. Yesterday it was fine. My web page is http://dawwin.x10.bz . Can someone fix this?
Today I noticed that $_SERVER['REMOTE_ADDR'] always contains "127.0.0.1" instead of correct remote host address. Yesterday it was fine. My web page is http://dawwin.x10.bz . Can someone fix this?
I don't see any errors on your site. If you are still having this problem, could you post the url where the error is happening?
My webpage looks fine, but i've got a problem with php variable $_SERVER['REMOTE_ADDR']; Normally it contains viewer's IP address, but today I noticed that it has value "127.0.0.1". This page http://dawwin.x10.bz/test.php contains following code
If it's fine you should see your public IP address. I need this in my guest book.Code:<?php echo $_SERVER['REMOTE_ADDR']; ?>
Please try the information in this thread: Regarding REMOTE ADDR
it works fine with
I've found this thread, before I asked, but I didn't check if it works, because thread was quite old and REMOTE_ADDR stopped work today.Code:$_SERVER['HTTP_X_FORWARDED_FOR']
Thanks
It appears the code we had in place to fix REMOTE_ADDR got lost in the server upgrade, I'll ask an admin to add it back in.
█ Ryan Schmidt | Level 2 Support
█ 888-X10-9668 - ryan[@]x10hosting.com
█ x10Hosting - Giving Away Hosting Since 2004
█ Premium Hosting | VPS Services