Linked Questions

164 questions linked to/from How to get the client IP address in PHP
240 votes
4 answers
1.0m views

I want to get the client IP address who uses my website. I am using the PHP $_SERVER superglobal: $_SERVER['REMOTE_ADDR']; But I see it can not give the correct IP address using this. I get my IP ...
user1752627's user avatar
  • 2,607
117 votes
9 answers
349k views

I'm using this PHP code to get a visitor's IP address: <?php echo $_SERVER['REMOTE_ADDR']; ?> But, I can't get the real IP address from visitors when they are using a proxy. Is there any way to ...
user avatar
31 votes
10 answers
13k views

I have developed a PHP webservice. I would like to log all incoming connections of the WS clients, which are consuming this web service. How can I obtain the client's IP address? The value of $_SERVER[...
-2 votes
2 answers
16k views

I've been trying to get real IP address of the user, and not a proxy address. For that I've done this: $ip1 = $_SERVER['REMOTE_ADDR']; $ip2 = $_SERVER['HTTP_X_FORWARDED_FOR']; $ip3 = $_SERVER['...
user3696690's user avatar
38 votes
0 answers
43k views

I would like to find a user's IP address when he/she enters my page. How do I programmatically do that?
Marcel's user avatar
  • 6,340
1 vote
2 answers
6k views

using $_SERVER['HTTP_CLIENT_IP'] is not providing the client's ip address. What could be the reason?
Arti's user avatar
  • 35
0 votes
2 answers
7k views

I have a webpage with PHP and im trying to get the client IP, but what I get is the server GATEWAY ip address (192.168.0.1). This is what I have at the office: ISP ---> ISP router ---> My router(192....
Redder's user avatar
  • 146
-2 votes
2 answers
5k views

As the title says it all, how do I add their IP addresses to my SQL database while they are registering. I'm hosting a game server to track which ID is on which IP. <?php if($...
-1 votes
2 answers
14k views

I am using the following function for getting the ip address of client. function get_client_ip() { $ipaddress = ''; if (isset($_SERVER['HTTP_CLIENT_IP'])) $ipaddress = $_SERVER['...
0 votes
1 answer
4k views

i'm coding web application and i wanna secure my customers accounts so i'll get their IPs and store them in the database is that enough to use $_SERVER['REMOTE_ADDR'] OR It's better to use these $...
JORDAN MI's user avatar
1 vote
1 answer
2k views

I am running a PHP script over PLESK that runs PHP codes via fastcgi to php feature. everything works well but when I want to get USER IP address via this code $_SERVER['SERVER_ADDR'] I encounter ...
Mehrdad201's user avatar
-1 votes
1 answer
2k views

I have a MySQL query that inserts the content of a form into my database. Along side inserting these values, I also want to discover and insert the users IP address.
user3359065's user avatar
0 votes
2 answers
2k views

I was trying to get IP and MAC address of client using PHP but I am unable to get that. I tried below code but it gives wrong MAC address - ob_start(); // Turn on output buffering system(‘ipconfig /...
-1 votes
1 answer
2k views

I am using Php superglobal $_SERVER['REMOTE_ADDR'] to get the client ip . But it always gives me different ip address and also ip provided by $_SERVER['REMOTE_ADDR'] is not correct my ip on local ...
pankaj roy's user avatar
-3 votes
1 answer
706 views

I 'm creating a web app in which i need to save the sessions in the database including the Ip address of the user and the date and time of the session , for that i want to know how to do that ,knowing ...
fodilleo's user avatar

15 30 50 per page
1
2 3 4 5
...
11