Not with php. There is a way of getting the forwarded proxy ip, but that is limited by security measures and type of web browser. What is the purpose for wanting the local ip information?

Apr 28, 2020 取得できない - PHPでクライアントのIPアドレスを取得するには? $_server['remote_addr']は実際には実際のクライアントipアドレスを含んでいないかもしれません。例えば、プロキシ経由で接続されたクライアントのプロキシアドレスを与えるでしょう。 しかし、あなたがipを使って何をしているかに応じて、あなたが本当に望んでいるものかもしれません。 [SOLVED] PHP + Remote SQL Server connection - Spiceworks

SQL database remote access using PHP

This section describes how to set up your PHP application on an IIS web server with PHP installed. It does not explain how to develop a PHP application. If the physical path that you entered in step 5 is to a remote share, type the IP address in the IP address box. Type a port number in the Port text box.

Another method is using the [‘REMOTE_ADDR’] in the $_SERVER array. [‘REMOTE_ADDR’] is only used for getting the IP address for the local servers although the output produced will be the same as using [‘SERVER_ADDR’] for the local server IP address. Example 1: This example identify the servers IP address using [‘SERVER_ADDR’].

How to connect to my sql server remotly(Using IP Address Aug 30, 2012 Manage Multiple, remote Servers with Server Manager Oct 16, 2017 PHP script to check server status online/offline Mar 01, 2009 nginx proxy to apache - Remote IP not recorded - Server Fault