So, I wanted to write myself a Java program, which will send a bunch of data (probably formatted as JSON) to my website, which will then write that data to MySQL, but I also want my website to get the IP, from which this data was sent.
But is this even possible? I don't have too much experience with PHP :/
The answer is here: http://stackoverflow.com/questions/15699101/get-the-client-ip-address-using-php
Easy solution is:
$IP = $_SERVER['REMOTE_ADDR'];