D
D
Doniyor Mamatkulov2018-10-02 14:57:22
PHP
Doniyor Mamatkulov, 2018-10-02 14:57:22

How to get local IP address?

Hey!
How to get the local IP address of a mobile device in PHP.
There is a Wi-Fi router that distributes the Internet to mobile devices (mobile phones / laptops).
How to get exactly the local IP address of the client assigned by the router . I write like this: but the script gives out the IP address through which I go to the Internet. Tried many ways but nothing works. But, after all, how do they get my local address on 2ip.ua?
echo $_SERVER['REMOTE_ADDR'];

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shatokhin, 2018-10-02
@doniyorbekm

They recognize it in js code, not in php.

B
Bogdan Karpov, 2018-10-02
@phpkoder

echo $_SERVER['SERVER_ADDR'];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question