Skip to main content

Questions tagged [ip-address]

An Internet Protocol address (IP address) is a numerical label assigned to each device in a computer network that uses the Internet Protocol for communication. This is a general tag that covers both IPv4 (like 172.168.100.1) and the newer IPv6 (like 2012:da8:0:1234:7:577:8:2). If you specifically mean any of these, use IPv4 or IPv6 tags.

ip-address
2209 votes
56 answers
2.6m views

How to get a Docker container's IP address from the host

Is there a command I can run to get the container's IP address right from the host after a new container is created? Basically, once Docker creates the container, I want to roll my own code ...
Murali Allada's user avatar
1435 votes
38 answers
2.2m views

How to get the client IP address in PHP

How can I get the client IP address using PHP? I want to keep record of the user who logged into my website through his/her IP address.
Anup Prakash's user avatar
  • 14.6k
736 votes
50 answers
1.0m views

Finding local IP addresses using Python's stdlib

How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?
UnkwnTech's user avatar
  • 90k
559 votes
31 answers
1.8m views

How to get client's IP address using JavaScript? [closed]

I need to somehow retrieve the client's IP address using JavaScript; no server side code, not even SSI. However, I'm not against using a free 3rd party script/service.
FlySwat's user avatar
  • 175k
552 votes
6 answers
219k views

Maximum length of the textual representation of an IPv6 address?

I want to store the data returned by $_SERVER["REMOTE_ADDR"] in PHP into a DB field, pretty simple task, really. The problem is that I can't find any proper information about the maximum length of the ...
Gilles's user avatar
  • 7,307
475 votes
7 answers
764k views

Is it possible to have SSL certificate for IP address, not domain name? [closed]

I want my site to use URLs like http://192.0.2.2/... and https://192.0.2.2/... for static content to avoid unnecessary cookies in request AND avoid additional DNS request. Is there any way to obtain ...
Evgenyt's user avatar
  • 10.6k
463 votes
32 answers
562k views

How to get IP address of the device from code?

Is it possible to get the IP address of the device using some code?
Nilesh Tupe's user avatar
  • 7,753
430 votes
22 answers
748k views

How to get a user's client IP address in ASP.NET?

We have Request.UserHostAddress to get the IP address in ASP.NET, but this is usually the user's ISP's IP address, not exactly the user's machine IP address who for example clicked a link. How can I ...
Mehdi's user avatar
  • 5,527
422 votes
16 answers
515k views

Express.js: how to get remote client address

I don't completely understand how I should get a remote user IP address. Let's say I have a simple request route such as: app.get(/, function (req, res){ var forwardedIpsStr = req.header('x-...
Erik's user avatar
  • 14.5k
373 votes
27 answers
382k views

How to get the IP address of the server on which my C# application is running on?

I am running a server, and I want to display my own IP address. What is the syntax for getting the computer's own (if possible, external) IP address? Someone wrote the following code. IPHostEntry ...
Nefzen's user avatar
  • 7,889
333 votes
13 answers
318k views

Get IP address of visitors using Flask for Python

I'm making a website where users can log on and download files, using the Flask micro-framework (based on Werkzeug) which uses Python (2.6 in my case). I need to get the IP address of users when they ...
Jon Cox's user avatar
  • 10.8k
325 votes
18 answers
118k views

What is the most accurate way to retrieve a user's correct IP address in PHP?

I know there are a plethora of $_SERVER variables headers available for IP address retrieval. I was wondering if there is a general consensus as to how to most accurately retrieve a user's real IP ...
Corey Ballou's user avatar
  • 43.1k
238 votes
4 answers
1.0m views

Get the client IP address using PHP [duplicate]

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,587
225 votes
20 answers
293k views

Find the IP address of the client in an SSH session

I have a script that is to be run by a person that logs in to the server with SSH. Is there a way to find out automatically what IP address the user is connecting from? Of course, I could ask the ...
flybywire's user avatar
  • 269k
218 votes
48 answers
598k views

Validating IPv4 addresses with regexp

I've been trying to get an efficient regex for IPv4 validation, but without much luck. It seemed at one point I had had it with (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(\.|$)){4}, but it produces some ...
Matthieu Cartier's user avatar

15 30 50 per page
1
2 3 4 5
259