When file included, REMOTE_ADDR is server's?


Posted on 16th Feb 2014 07:03 pm by admin

I have an index file that handles my site, basically index.php?page=ip will activate "require('./ip.php')".

In the included file I have $ip = $_SERVER['REMOTE_ADDR']; and when it FIRST displays, it displays "10.15.15.254" or similar, the server's IP! I have tried doing: $ip = $_SERVER['REMOTE_ADDR']; //before require, so IP variable is passed
Did you know?Explore Trending and Topic pages for more stories like this.
require('./ip.php'); in the INDEX and allowing the required file to take it, but it still does it. It turns to the user's actual IP when they refresh etc. Why?
No comments posted yet

Your Answer:

Login to answer
202 Like 33 Dislike
Previous forums Next forums
Other forums

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

Problem with PHP/mySQL login code
Hello,

There is an error in my login script and I can't figure out what it is...
I believe

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

SAP FICO learning materials
Hi all,
I am new to this world of SAP FICO. I have taken training on SAP FICO, but was wonderin

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash