Good day, I have created a PHP API, that accepts GET/POST requests.
I would like to get the IP address of the server which made a request to my API in order for me to do some verification.
I tried to use $_SERVER['REMOTE_ADDR']
value for that, but noticed that it doesn't work well with all kind of websites.
I tried to search online for a solution, but only found how to get client's IP.
And I guess that "client" means the user that triggered the API call.
What I need is the website's server address from which request has been made.
Could someone offer a better way to do that?