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
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

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.

When we try to pass an array from VB6.0 to an Oracle PL/SQL

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a dir

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.

Code: $moderators = array('Admin', 'ba

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

How to make URL loads only on login
On my page, when a user login he's redirects to user_home.php. I made it also to open the chat scree

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

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